Hendrik van Rooyen wrote:
> "Jeff Pang" <p...uno.com> wrote:
>> I want to transmit an array via socket from a host to another.
>> How to do it? thank you.
> 
> pickle it and send it and unpickle it on the other side.
> 
> See the cPickle module docs for loads and dumps.

In particular note:

     Warning: The pickle module is not intended to be secure
     against erroneous or maliciously constructed data. Never
     unpickle data received from an untrusted or
     unauthenticated source.

Pickle works great for lots of things, but combining
pickle and socket is scary. If an unfriendly can connect
to our socket, they can feed us a *poison* pickle. The
marshal module is at least as bad.

The marshaling in RPC facilities tends to be much safer.


-- 
--Bryan
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to