Pickled objects over the network

Walker Lindley brotherjenos at gmail.com
Thu Jul 19 01:51:57 EDT 2007


I tried implementing the sending the length and then the pickle string
method and that worked most of the time. The problem we ran into was if the
string got split up into multiple packets and you read the first one and
tried to unpickle it, you'd get an error. So a while loop that keeps calling
recv until you have the correct amount of data solves that problem. It still
doesn't make pickle secure, though, so we'll probably end up doing something
else. Thank you to everyone for all of your great help and insight.


-Walker

On 7/18/07, Eduardo EdCrypt O. Padoan <eopadoan at altavix.com> wrote:
>
> On 7/18/07, Jean-Paul Calderone <exarkun at divmod.com> wrote:
> > On Tue, 17 Jul 2007 14:57:16 -0700, Walker Lindley <
> brotherjenos at gmail.com> wrote:
> [...]
> > The obvious thing you're doing wrong is using pickle over a network. ;)
> >
> >   http://jcalderone.livejournal.com/15864.html
>
> Ok, maybe not the best tools to the job, but there are some more
> secure alternatives:
> http://trustedpickle.sourceforge.net/
> http://home.gna.org/oomadness/en/cerealizer/index.html
>
> --
> EduardoOPadoan (eopadoan->altavix::com)
> Bookmarks: http://del.icio.us/edcrypt
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
This e-mail is licensed under the Creative Commons
Attribution-NoDerivs 2.5License. To view a copy of this license, visit
http://creativecommons.org/licenses/by-nd/2.5/ or send a letter to Creative
Commons, 543 Howard Street, 5th Floor, San Francisco, California, 94105,
USA.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070718/162ea49d/attachment.html>


More information about the Python-list mailing list