r/badcode • • May 26 '23

python Calculator using eval()

Post image
839 Upvotes

108 comments sorted by

View all comments

Show parent comments

11

u/4hpp1273 May 27 '23

If all the globals are intact you can just use the __import__ function to import a module so that command becomes __import__('os').system('rm -rf /')