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: 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 Subject: Re: Pickle file and send via socket Date: Mon, 06 Aug 2012 18:45:58 +0200 References: 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: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 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