Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed3a.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.009 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'subject:Python': 0.06; '64-bit': 0.07; '32-bit': 0.09; 'restart': 0.09; 'cc:addr:python- list': 0.11; 'python': 0.11; 'bug': 0.12; 'windows': 0.15; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'idle,': 0.16; 'idle.': 0.16; 'segfault': 0.16; 'supplied': 0.16; 'wrote:': 0.18; '>>>': 0.22; 'issue.': 0.22; 'cc:addr:python.org': 0.22; 'mon,': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'am,': 0.29; 'tim': 0.29; 'message- id:@mail.gmail.com': 0.30; 'work.': 0.31; 'code': 0.31; '>>>>': 0.31; 'chase': 0.31; "d'aprano": 0.31; 'steven': 0.31; 'probably': 0.32; 'linux': 0.33; 'test': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'pm,': 0.38; 'ian': 0.60; "you're": 0.61; 'transparent': 0.68; 'results': 0.69; 'caused': 0.69; '=====': 0.84; 'actually,': 0.84; '1:47': 0.91; 'to:none': 0.92 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=1DyKWuPejEqhFKg5+YyWW+8yacUJGmPkvjAa4EjA4wk=; b=Zhw5mgjLyXx93OyKzRkJr1HCsjgObDr/Do4cCcvHZpDnLLZlR/0VyY3idKy1GOG0UA AaFSOh1tKPEOEtGjWH3eSj5k1btKxcTASrtKfIO3yqNeVuSvpmp+7ZGdW5H5vIATVS8R VGv/BARHfpPZhY7vvTR34zxgrUcsvQjixEIdL/atZ1SXeoaScNbQyQxpirMWSBc/LWd4 jthihPrF7hgk6eMS/4sR4p8if+WRz2HsupIkCEztHurXAYn+yqU4qmkti7/lflBgxV5h 9w2QIn/DSq+wVMk5QCN+A9eY7hl1C478lFnAKKWhkMCztn2J5H2iIbh8pAIxxurrS975 BH3w== MIME-Version: 1.0 X-Received: by 10.58.74.164 with SMTP id u4mr723090vev.81.1401724600969; Mon, 02 Jun 2014 08:56:40 -0700 (PDT) In-Reply-To: References: <538c69d5$0$29978$c3e8da3$5496439d@news.astraweb.com> <20140602072718.071feab3@bigbox.christie.dr> <538c9a78$0$29978$c3e8da3$5496439d@news.astraweb.com> Date: Tue, 3 Jun 2014 01:56:40 +1000 Subject: Re: Obfuscated Python hack From: Chris Angelico Cc: Python Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 26 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1401724608 news.xs4all.nl 2918 [2001:888:2000:d::a6]:38160 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:72420 On Tue, Jun 3, 2014 at 1:47 AM, Ian Kelly wrote: > On Mon, Jun 2, 2014 at 9:38 AM, Steven D'Aprano > wrote: >> On Mon, 02 Jun 2014 23:23:53 +1000, Chris Angelico wrote: >> >>> On Mon, Jun 2, 2014 at 10:27 PM, Tim Chase >>> wrote: >>>> Stripping off the exec() call makes it pretty transparent that you're >>>> attempting (successfully on some platforms) to set the value of "4" to >>>> "5". But a cute hack. >>> >>> And not on Windows inside IDLE, where attempting to use 4 results in a >>> ===== RESTART ===== crash. >> >> Sounds like a bug in IDLE. >> >> What happens if you try it in Windows without IDLE, just using the >> standard interactive interpreter? > > Actually, probably a 32/64-bit issue. The code as supplied caused a > segfault on my 64-bit Linux install. I had to change the offset to 16 > to see it work. My test was a 32-bit Python 2.7.4, for what it's worth. ChrisA