Obfuscated Python: fun with shadowing builtins

M

Michael Hoffman

I was compelled to write this today for some reason.

builtins = """__import__ abs basestring bool callable chr
classmethod cmp compile complex delattr dict dir
divmod enumerate eval execfile file filter
float frozenset getattr globals hasattr hash help hex
id input int isinstance issubclass iter len list
locals long map max
min object oct open ord pow
property range raw_input reduce
reload repr reversed round set setattr
slice sorted staticmethod str
sum super tuple type unichr
unicode vars xrange zip"""

unicode=lambda long:apply(long.split);float=lambda int:getattr(__builtins__,unicode(builtins)[15])(unicode(builtins)[int]);staticmethod,long=lambda long:float(int(str(1)*int(2))*unicode(builtins).index(long.__name__)), lambda staticmethod:unicode(apply(builtins.splitlines)[staticmethod]);int=float(0)(apply(str).join(unicode(builtins)[staticmethod(bool)(long(2*int))][staticmethod(bool)(long(2*int+1))] for int in staticmethod(classmethod)(staticmethod(bool)(long(-1)))))

Enjoy ;)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top