Path: csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed8.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.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.05; 'executable': 0.07; 'permission,': 0.09; 'cc:addr:python-list': 0.10; 'appropriate': 0.14; 'thu,': 0.15; 'executable.': 0.16; 'executed,': 0.16; 'extensions,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'happily': 0.16; 'wrote:': 0.16; 'bytes': 0.18; 'windows': 0.20; 'extension': 0.20; 'prevent': 0.20; 'cc:2**0': 0.21; 'cc:addr:python.org': 0.21; 'am,': 0.23; '2015': 0.23; 'header:In-Reply-To:1': 0.24; 'unix': 0.24; 'header': 0.24; 'van': 0.26; 'least': 0.27; 'message- id:@mail.gmail.com': 0.28; "doesn't": 0.28; 'run': 0.32; 'file': 0.34; 'received:google.com': 0.34; 'subject:: ': 0.37; 'subject:Data': 0.66; '512': 0.84; 'chrisa': 0.84; 'commands.': 0.84; 'etc),': 0.84; 'to:none': 0.90; 'edwards': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=ybXs67fh2aGyGf0XpmhWQ+dEZ5/5Jd2vgN3VHDwaZqM=; b=Xhu2fVi6qFbbKHMceuGlg0DdFS+lQr8pN6XmEk0dn7jrm3rUh3JXTjkW3mHXLMMGq6 JezCNihdt6eEi/cIE/qcNZrbQT/7w9UXW7/QmjL0fssgMaJIykc8L9mE35SifQ7+zt41 R5qbmGNgUYvNqYRxFS176GDiYEgZQYd/H6QgvXP6wUc65BMzoSu6oO8QWcHvHxB1bmYa jdNyApdxwipCOmUxBwhxjfl4TwIGl7W60u6QrO8+EPsdV0JMpf7SIoq86CK4mqoFiLjZ yYqslIXyh6Fh3bPDOQKua03WSbxIt7TEokPygc/nN+hhhX/jLodTwlzMS3Xrtbr5IMF5 k62w== MIME-Version: 1.0 X-Received: by 10.50.43.196 with SMTP id y4mr915510igl.14.1435163012895; Wed, 24 Jun 2015 09:23:32 -0700 (PDT) In-Reply-To: References: <558a9649$0$1675$c3e8da3$5496439d@news.astraweb.com> Date: Thu, 25 Jun 2015 02:23:32 +1000 Subject: Re: Pure Python Data Mangling or Encrypting From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: 15 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1435163021 news.xs4all.nl 2889 [2001:888:2000:d::a6]:58135 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:93086 On Thu, Jun 25, 2015 at 2:16 AM, Grant Edwards wrote: > On 2015-06-24, Emile van Sebille wrote: >> Mangling would at least prevent it from executing. > > If you don't want a file to be executed, then don't make it > executable. Or doesn't Windows have any way to control whether a file > is executable or not? Windows doesn't have the Unix file system concept of execute permission, no. If a file has the .exe extension and the first 512 bytes look like an appropriate header (MZ etc), Windows will happily run it. With other extensions, similarly - just create a .bat file and double-click it, it'll run the commands. ChrisA