revenge of the python puzzle
Delaney, Timothy
tdelaney at avaya.com
Thu Sep 26 01:09:03 EDT 2002
> From: Michal Wallace [mailto:sabren at manifestation.com]
>
> Okay, so you guys think you're so smart. Try this one! No
> contest this time, I've learned my lesson. (I suppose if
> someone really wants some free hosting bad enough to solve
> this puzzle, you could talk me into it, but I'm just posting
> this for revenge... Um, I mean "fun".)
Hmm - a little bit harder. The fake perl actually made it easier though
(gave while and s).
def decrypt(yourstring):
dedict = {
'a': 'm',
'b': 'r',
'c': 'y',
'd': 'j',
'e': 'b',
'f': 'd',
'g': 'l',
'h': 'i',
'i': 'e',
'j': 'u',
'k': 'w',
'l': 'v',
'm': 'o',
'o': 'k',
'p': 't',
'q': 'g',
's': 's',
't': 'x',
'u': 'p',
'v': 'f',
'w': 'c',
'x': 'h',
'y': 'n',
'z': 'a',
}
return "".join([dedict.get(i,i) for i in yourstring])
data = r'''wbjig_ucpxmy, kxzp_xzli_h_fmyi \
='ilhg.zuuiyf(ghsp(izwxmyi))',\
"zkvjg wmfi hs sm ajwx vjy"
hv 'h za sazbp': 'hp djsp ahqxp bjy'
"hp's sm ajwx kmbsi pxzy 'xiggm kmbgf'"
"kxc, pxisi yitp ghyis zgamsp gmmo ghoi uibg!"
'kxhgi(<>){wxmau;s/uibg/ucpxmy;ubhyp}';mbzyqis='vbjhp';
ezf="'iyhpgzlm bjmc oyhbf'=qsa;qsa gzemgqtqsa pyhbu";
iaupc="";qgmezg izwxmyi;ilhg=[];
'ejp z siwbip xibi hs hy cmjb bizwx'
zuugis=mbzyqis, "izwxmyi=izwx"
fiv fm(pzso="fm kxzp h zso"):
qgmezg izwxmyi; itiw pzso
"zyf djsp hy wzsi cmj'bi ymp uibugitif,"
kmbsi,ymk = (ezf.sughp('t'),"!")
vmb izwx hy kmbsi:
itiw zuugis[1]
hv izwx hy kmbsi:
fm(wbjig_ucpxmy)
kmbsi = ilhg; "ilhg".sughp().bilibsi()
[izwx.bilibsi() vmb izwx hy kmbsi]
"zyf ymk ki'li bizwxif pxi vhyzg libsi";
azu(fm, azu(iaupc.dmhy, kmbsi))'''
print decrypt(data)
More information about the Python-list
mailing list