Skip to content

Instantly share code, notes, and snippets.

@Rufflewind
Last active August 29, 2015 14:20
Show Gist options
  • Select an option

  • Save Rufflewind/ee0f6d76ec4d126baa29 to your computer and use it in GitHub Desktop.

Select an option

Save Rufflewind/ee0f6d76ec4d126baa29 to your computer and use it in GitHub Desktop.

Revisions

  1. Rufflewind created this gist Aug 8, 2008.
    51 changes: 51 additions & 0 deletions obfuscated-python
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,51 @@
    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()')