Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def toHex(s):
- lst = []
- for ch in s:
- hv = hex(ord(ch)).replace('0x', '')
- if len(hv) == 1:
- hv = '0'+hv
- lst.append(hv)
- return reduce(lambda x,y:x+y, lst)
- # message to decrypt
- sss="5ebad7dcbd73584f32ef949486a161a1e9f10e48ade43b03649a2ca680f327c4".decode('hex')
- # key found inputting empty message on the server. since key^0=key <-- we got the key.
- key="0ad2b2fcdb1f39281286e7b4e4995795d8906d709e82583b51ff18c3b4c745a7".decode('hex')
- p=0
- for i in sss:
- print chr(int(toHex(i),16)^int(toHex(key[p]),16)),
- p+=1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement