Server Questions (2 of them)
Hrvoje Niksic
hniksic at xemacs.org
Sun Nov 20 16:44:25 EST 2011
Andrew <andrew.chapkowski at gmail.com> writes:
> How to do you create a server that accepts a set of user code?
[...]
Look up the "exec" statement, the server can use it to execute any code
received from the client as a string.
Note "any code", though; exec runs in no sandbox and if a malicious
client defines addition(1, 2) to execute os.system('sudo rm -rf /'), the
server will happily do just that.
More information about the Python-list
mailing list