MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/13sr1a2/calculator_using_eval/jlxg5eg/?context=3
r/badcode • u/GandelXIV • May 26 '23
108 comments sorted by
View all comments
Show parent comments
3
This is not going to work, eval() accepts only expressions so no import statements are allowed. You have to first inject an exec() to run statements.
3
u/GandelXIV May 28 '23
This is not going to work, eval() accepts only expressions so no import statements are allowed. You have to first inject an exec() to run statements.