Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Perl Python Partial Polyglot

by kschwab (Priest)
on Jan 22, 2014 at 19:38 UTC ( #1071660=obfuscated: print w/ replies, xml ) Need Help??

Runs under perl and/or python and produces *almost* the same output...
0 and chr <<1; '''#' 1 use strict;use warnings; sub perl{ map{m&${\uc(q,m,)}&&&($,.=$_,)=~s,[^A-z0-6],,xg}@_;($_=$,) =~tr$A-Za-z0-9+,$ -_$;for(unpack("u",join('',map(chr(32+ length($_)*3/4).$_,m$(.{1,60})$gs)))){$.='$_'.'="';map {$..="\\$_"}unpack('(a3)*',$_.'012');$..='"';eval(${\$.}), s;\x50++\S{5}+;\u${\substr((caller(0e0))[0b11],-4) };;print}}${{}={<<'1<<1'=>1} #''' l=('137137151155160157162164137137''050047142141163145066064047051', '161056142066064144145143157144''145050143051', 'MTEyMTY1MTYzMTY0MDQwMTQxMTU2MTU3MTY0' 'MTUwMTQ1MTYyMDQwMTIwMTcxMTY0MTUwMTU3' 'MTU2MDQwMTUwMTQxMTQzMTUzMTQ1MTYyMDU0' ) def l1(l):[(yield'\\'+l[i:i+(2|1)])for i in xrange(0,len(l),(2|1))] i,I=lambda l:eval('"'+''.join(list(l1(l)))+'"'),lambda l:eval(i(l)) c,q=l[0o0+-0o1],I(l[0o1&0o2]);print(i(I(l[-(0o3^0o1)],))) ''' 1<<1 and 1; perl(split/\n/,(keys(${{}))[0]) #'''

Comment on Perl Python Partial Polyglot
Download Code
Re: Perl Python Partial Polyglot
by boftx (Chaplain) on Jan 23, 2014 at 14:28 UTC

    Have you considered becoming a member of Opus Dei?

    It helps to remember that the primary goal is to drain the swamp even when you are hip-deep in alligators.
      Heh. Trying to write obfuscated Python feels a bit like a cilice I suppose.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: obfuscated [id://1071660]
Approved by tobyink
Front-paged by Athanasius
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2014-11-01 01:47 GMT
Find Nodes?
    Voting Booth?

    For retirement, I am banking on:

    Results (227 votes), past polls