Advertisement
Guest User

Untitled

a guest
Jan 27th, 2014
538
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. def toHex(s):
  2. lst = []
  3. for ch in s:
  4. hv = hex(ord(ch)).replace('0x', '')
  5. if len(hv) == 1:
  6. hv = '0'+hv
  7. lst.append(hv)
  8. return reduce(lambda x,y:x+y, lst)
  9. # message to decrypt
  10. sss="5ebad7dcbd73584f32ef949486a161a1e9f10e48ade43b03649a2ca680f327c4".decode('hex')
  11. # key found inputting empty message on the server. since key^0=key <-- we got the key.
  12. key="0ad2b2fcdb1f39281286e7b4e4995795d8906d709e82583b51ff18c3b4c745a7".decode('hex')
  13. p=0
  14. for i in sss:
  15. print chr(int(toHex(i),16)^int(toHex(key[p]),16)),
  16. p+=1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement