Advertisement
Guest User

Untitled

a guest
Feb 9th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. import hashlib
  2. import hmac
  3. import base64
  4.  
  5. msg="\0\0\0\347\0\0\0\1\5_auth\2\0\0\0c\4hsha\1\0\0\0Y\243obYZiHnJ4E7fXMgUkIg22nPZCRwlChhV6RPMPVeopCo=\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5_ctrl\2\0\0\0O\4_ser\1\0\0\0\t827373710\4_tim\1\0\0\0\n1455019835\4_exp\1\0\0\0\n1455019895\6_nonce\1\0\0\0\01092373524\5_data\2\0\0\0\20\4type\1\0\0\0\6status"
  6. hdata = msg[118:]
  7. print repr(msg[:118])
  8. print repr(hdata)
  9. print base64.b64encode(hmac.new('1234abcd8765', hdata, hashlib.sha1).digest())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement