Skip to content

Instantly share code, notes, and snippets.

@Rufflewind
Last active August 29, 2015 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Rufflewind/ee0f6d76ec4d126baa29 to your computer and use it in GitHub Desktop.
Save Rufflewind/ee0f6d76ec4d126baa29 to your computer and use it in GitHub Desktop.
some obfuscated Python script I wrote 7 years ago
0
o\
=0\
-+-0
d='''
KAkAAA
BzCwAAA
E1BU1RFU
k1JTkQKcx
EAAABFbnRl
ciBndWVzczo
KPj4+IHMPAAA
ASW52YWxpZCBn
dWVzcy4KcyAAAA
BZb3Ugd2luISBJd
CB0b29rIHlvdSAla
SBndWVzc2VzLnMgAA
AAWW91IGxvc2UuIFRo
ZSBjb3JyZWN0IGtleSB
pcyAlcy5zHAAAACVzIC0
gZXhpc3Q6ICVpOyBwb3Np
dGlvbjogJWl0AAAAAGkEAA
AAaQwAAAA=''' ;import \
marshal,random,string;v\
=2 ;s= marshal. loads(d.\
decode('base64'));exec('''
class m:\n def __init__(e):
\x20 print(s[0]);e.g,v=[],\
lambda u:len(u)==s[7] and (\\
u.isdigit())and(e.__r(u))and (
u)not in e.g; e.__k() ;\n whi\
le(len(e.g)<s[8]):\n\40 u=e. \\
__i(v,s[1],s[2]) ;e.g +=[u] ;e. \
__p()\n if u== e. k: print(s[3]%
len(e.g));break\n else:print(s[4]%
e.k)\n def __k(e):\12 d,e. k=list (
string.digits),s[6]\n for(i)in rang\
e(s[7]) :e. k+=d.pop(random.randint(0,
len(d)-1 ))\n def __i(f, c,g ,r) :\n \
while(s[0]):\n exec('a='+(v>=3 and[\'\
\']or[\'raw_\'])[0]+\'input(g). replace(\
string.whitespace,s[6]).lower()\')\n if\
\40c(a):break\n \x20print(r)\12 return a;
\x20def __p(e) :\x0A for u in e.g: print(s[
5]%((u,)+e.__g(u)))\n print(s[6])\x0A def \\
__g(e,u):\n x,p=0,0\x0A\40 for(d)in u:\12 \
if d==e. k[u.index(d)]:p+=1\n\40 elif d in e.\
k:x+=1\12 return x,p;\n def __r(e,u):\n c=set(
u); \n for r in u: \x0A \40 if((r not in c)or(
c. remove(r))) :return s[6]\x0A return s[0]\n''')
m();exec((v>=3 and['\x20']or['raw_'])[0]+'input()')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment