Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4a.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.022 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'subject:Python': 0.06; '64-bit': 0.07; 'restart': 0.09; 'bug': 0.12; 'windows': 0.15; 'idle,': 0.16; 'idle.': 0.16; 'segfault': 0.16; 'supplied': 0.16; 'wrote:': 0.18; '>>>': 0.22; 'issue.': 0.22; 'mon,': 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; 'chase': 0.31; "d'aprano": 0.31; 'steven': 0.31; 'probably': 0.32; 'linux': 0.33; 'but': 0.35; 'received:google.com': 0.35; 'to:addr :python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; "you're": 0.61; 'transparent': 0.68; 'results': 0.69; 'caused': 0.69; '=====': 0.84; 'actually,': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=zLxXFoZXI/XPysDnYkrZVrRPU/pWbmiASGs8qwdJQng=; b=VbRqDwY1LDrEj2d2LlWVjyNIayHbAQd3AbiguGTElynTE6LHRYmspaMlto6K4IM9Ot DJpYo0pJ3eweCylBCNV53E9jVvyl22EhkRilJcJzXKiLGMGQnP/4DLCT56c42mFqyobV glblaXNmrgDWENxmQcq1br0sZFmrrCYmmHosVal5SWTHuJxBGOX9lHaT3KtoA5T8y7aw YDpOe8KCsXw3WK0awN3QgF1JPqi/JbRhQHl79nOuhbml9J2O1SaGvARI8E9XrHN191OS j9LT9pW/bO95TjgyY7Yw0CoEDBysdWt1gcG06MTeZnzjJaDQY+HAfkcxkfAJOGgU56eG fJMA== X-Received: by 10.236.157.40 with SMTP id n28mr53586502yhk.29.1401724089878; Mon, 02 Jun 2014 08:48:09 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <538c9a78$0$29978$c3e8da3$5496439d@news.astraweb.com> References: <538c69d5$0$29978$c3e8da3$5496439d@news.astraweb.com> <20140602072718.071feab3@bigbox.christie.dr> <538c9a78$0$29978$c3e8da3$5496439d@news.astraweb.com> From: Ian Kelly Date: Mon, 2 Jun 2014 09:47:29 -0600 Subject: Re: Obfuscated Python hack To: 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: 21 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1401724099 news.xs4all.nl 2959 [2001:888:2000:d::a6]:33597 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:72418 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.