Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #26637

Re: Pickle file and send via socket

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.003
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'socket': 0.05; 'source.': 0.05; 'hosts': 0.07; 'subject:file': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'from:addr:cheimes.de': 0.16; 'from:addr:lists': 0.16; 'from:name:christian heimes': 0.16; 'maliciously': 0.16; 'message-id:@dough.gmane.org': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'socket.': 0.16; 'subject:send': 0.16; 'module': 0.19; 'second': 0.24; 'connected': 0.24; 'host': 0.24; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.28; 'pickle': 0.29; 'writes': 0.30; 'url:python': 0.32; 'file': 0.32; 'anyone': 0.33; 'to:addr:python-list': 0.33; 'christian': 0.34; 'server': 0.35; 'received:org': 0.36; 'url:org': 0.36; 'data.': 0.36; 'url:library': 0.36; 'client': 0.36; 'possible': 0.37; 'does': 0.37; 'data': 0.37; 'subject:: ': 0.38; 'object': 0.38; 'url:docs': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'skip:u 10': 0.60; 'first': 0.61; 'risk': 0.66; 'secure': 0.67; 'pickled': 0.84; 'subject:via': 0.84; 'trustworthy': 0.91
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Christian Heimes <lists@cheimes.de>
Subject Re: Pickle file and send via socket
Date Mon, 06 Aug 2012 18:45:58 +0200
References <f3b73b0e-1520-4768-a1d2-bb754357dfc7@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host smtp.semantics.de
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0
In-Reply-To <f3b73b0e-1520-4768-a1d2-bb754357dfc7@googlegroups.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3018.1344271574.4697.python-list@python.org> (permalink)
Lines 19
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1344271574 news.xs4all.nl 6946 [2001:888:2000:d::a6]:42686
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:26637

Show key headers only | View raw


Am 06.08.2012 15:32, schrieb S.B:
> Does anyone know if it's possible to pickle and un-pickle a file across a network socket. i.e: 
> First host pickles a file object and writes the pickled file object to a client socket.
> Second host reads the pickled file object from the server socket and un-pickles it.

Have you read the warning in the first paragraph of the pickle docs?
Pickles are a major security risk unless both hosts are trustworthy and
are either inside a protected network or are connected over a secure line.

http://docs.python.org/library/pickle.html#module-pickle

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.


Christian Heimes

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Pickle file and send via socket "S.B" <hyperboogie@gmail.com> - 2012-08-06 06:32 -0700
  Re: Pickle file and send via socket Nobody <nobody@nowhere.com> - 2012-08-06 17:11 +0100
  Re: Pickle file and send via socket Christian Heimes <lists@cheimes.de> - 2012-08-06 18:45 +0200
  Re: Pickle file and send via socket Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-08-06 15:26 -0400
  Re: Pickle file and send via socket "S.B" <hyperboogie@gmail.com> - 2012-08-07 04:21 -0700
    Re: Pickle file and send via socket lipska the kat <lipskathekat@yahoo.co.uk> - 2012-08-07 14:07 +0100
  Re: Pickle file and send via socket lipska the kat <lipskathekat@yahoo.co.uk> - 2012-08-08 13:48 +0100
    Re: Pickle file and send via socket "S.B" <hyperboogie@gmail.com> - 2012-08-08 06:50 -0700
      Re: Pickle file and send via socket lipska the kat <lipskathekat@yahoo.co.uk> - 2012-08-08 16:07 +0100

csiph-web