Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #72409
| Date | 2014-06-02 07:27 -0500 |
|---|---|
| From | Tim Chase <python.list@tim.thechases.com> |
| Subject | Re: Obfuscated Python hack |
| References | <538c69d5$0$29978$c3e8da3$5496439d@news.astraweb.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.10557.1401712081.18130.python-list@python.org> (permalink) |
On 2014-06-02 12:11, Steven D'Aprano wrote:
> Kids, don't try this at home!
>
> In Python 2.7, run this:
>
> exec((lambda *fs: reduce(lambda f, g: lambda x: f(g(x)),
> fs))(*([lambda s:
> s[1::2]+s[-2::-2]]*54))('motcye;cye._n8fo_drs(d4+)vle=5 ua.8)
> (isedamr.ticspt spt rpi'))
>
>
> Then run these:
>
> 10 - 6 == 10 - 5
> 4 + 1 == 7 - 1
> 2*2 == 10//2
>
> A shiny penny for the first person to explain what's going on.[1]
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.
-tkc
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Obfuscated Python hack Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-06-02 12:11 +0000
Re: Obfuscated Python hack Tim Chase <python.list@tim.thechases.com> - 2014-06-02 07:27 -0500
Re: Obfuscated Python hack Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-06-03 17:40 +1200
Re: Obfuscated Python hack Chris Angelico <rosuav@gmail.com> - 2014-06-02 23:23 +1000
Re: Obfuscated Python hack Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-06-02 15:38 +0000
Re: Obfuscated Python hack Ian Kelly <ian.g.kelly@gmail.com> - 2014-06-02 09:47 -0600
Re: Obfuscated Python hack Chris Angelico <rosuav@gmail.com> - 2014-06-03 01:55 +1000
Re: Obfuscated Python hack Chris Angelico <rosuav@gmail.com> - 2014-06-03 01:56 +1000
csiph-web