2011/11/20 Andrew :
> Hello List,
>
> How to do you create a server that accepts a set of user code?
>
> For example,
>
> I would like to send this function:
> def addition(x,y):
> return x+y
> and have the socket server perform the operation and send is back to
> the end user.
>
> Question 2:
>
On Nov 21, 10:27 am, Christian Heimes wrote:
> It's possible to sandbox Python code, see
> http://docs.python.org/library/rexec.html
Although this has been deprecated since 2.6 & removed from 3.x (and
cautioned against for as long as I've used Python).
PyPy provides some sandboxing functionality
Am 20.11.2011 22:44, schrieb Hrvoje Niksic:
> Andrew 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
Andrew 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) t
On Mon, Nov 21, 2011 at 7:02 AM, Andrew wrote:
> Hello List,
>
> How to do you create a server that accepts a set of user code?
>
> For example,
>
> I would like to send this function:
> def addition(x,y):
> return x+y
> and have the socket server perform the operation and send is back to
> the