This went over quite well.
This went over quite well.
"that's disgusting"
"this has got to stop"
"you've gone too far with this"
"is this a joke?"
"I never knew the c could stand for Cthulhu."
And after the exec, if they asked me to parse a Python expression, I'd type "eval(expr)".
Edit: also, all valid JSON is valid Python. Do not `eval(input_data)` in prod or I will haunt you. But, in an emergency…
My example was just as a joke.
For real use, I would only use it with my own trusted input.
Sure, you could fake it with custom objects and all of that, but not when I'm pasting a string value into a REPL. If you had hijacked my workstation, shell or the remote python to the point you can exploit that... Yeah. I don't think you'd need me as a user then anymore.