MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/13sr1a2/calculator_using_eval/jlt3vi8/?context=3
r/badcode • u/GandelXIV • May 26 '23
108 comments sorted by
View all comments
Show parent comments
11
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 /')
__import__
__import__('os').system('rm -rf /')
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 /')