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
106 comments sorted by
View all comments
Show parent comment
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.
View all comments
Show parent comment
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.