Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.010 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'scripts': 0.03; 'interpreter': 0.05; 'binary': 0.07; 'wednesday,': 0.07; 'executable': 0.09; 'subject:files': 0.09; 'python': 0.11; 'deletion': 0.16; 'likewise': 0.16; 'scripts.': 0.16; 'set,': 0.16; 'tool.': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'code.': 0.18; 'wed,': 0.18; 'mechanism': 0.19; '>>>': 0.22; 'code,': 0.22; 'example': 0.22; 'header:User-Agent:1': 0.23; 'processor': 0.24; 'regardless': 0.24; 'script': 0.25; 'holds': 0.26; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'instruction': 0.29; 'have,': 0.30; "i'm": 0.30; 'code': 0.31; 'url:wiki': 0.31; '-0700,': 0.31; 'anyone': 0.31; 'file': 0.32; 'run': 0.32; "can't": 0.35; 'no,': 0.35; 'point.': 0.35; 'but': 0.35; 'method': 0.36; 'hi,': 0.36; 'url:org': 0.36; 'level': 0.37; 'system,': 0.38; 'others.': 0.38; 'to:addr:python-list': 0.38; 'legitimate': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'either': 0.39; 'skip:u 10': 0.60; 'deleting': 0.60; 'different': 0.65; 'charset:windows-1252': 0.65; 'received:74.208': 0.68; 'secure': 0.71; 'lowest': 0.74; '2015': 0.84; 'clearer': 0.84; "it'd": 0.84; 'received:74.208.4.194': 0.84; 'encrypted': 0.91 Date: Fri, 08 May 2015 08:13:57 -0400 From: Dave Angel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Encrypt python files References: <686d08c9-adb7-4f0b-af8d-4d37d9ad4c0e@googlegroups.com> <72bd42d6-6926-44ce-bd6f-956ce40afe08@googlegroups.com> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:F7WtMus9Xpm1CUDl/zVzIll5acuBh05rXP1W26z5il8KqE2Skh5 6qF3/RWI5DyGG8G7o3Iz6RRQRWrJYCi9sv+D+tJbuXdpBf1M711L7litaFMSxdockJyIglQ awexx2FxDUfzUtRX7iCjEJ9IjRPOHLNVWh7HawcGVQavSiUP8AtzAc11LK94Nms4i6wSg05 oMf80OB97BKdZMdA91uVg== X-UI-Out-Filterresults: notjunk:1; X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ 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: 44 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1431087248 news.xs4all.nl 2889 [2001:888:2000:d::a6]:54204 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:90153 On 05/08/2015 06:59 AM, Denis McMahon wrote: > On Wed, 06 May 2015 00:23:39 -0700, Palpandi wrote: > >> On Wednesday, May 6, 2015 at 12:07:13 PM UTC+5:30, Palpandi wrote: >>> Hi, >>> >>> What are the ways to encrypt python files? >> >> No, I just want to hide the scripts from others. > > You can do that by deleting the scripts. Make sure you use a secure > deletion tool. > > I'm not aware of any mechanism for encrypted executable python scripts. > You can obfuscate the code, but you can't encrypt it because the python > interpreter needs the script file to execute it. > > The same holds true for any mechanism designed to encrypt executable code > regardless of whether it's script or compiled. At the lowest level the > processor only understands the instruction set, and encrypted code has to > be decrypted to execute. > > As the decryption method is always available to anyone who has legitimate > access to execute the code, it's impossible to hide the code at that > point. > > Example - if I give you an encrypted binary to run on your system, it > either has to be unencryptable It'd be clearer if you used decryptable, since unencryptable has a very different meaning. http://en.wiktionary.org/wiki/unencryptable > using tools you already have, or using a > built in unencrypter, both of which you have access to and can use to > unencrypt the encrypted executable code. > likewise decrypter and decrypt. -- DaveA