Guest User

Untitled

a guest
Apr 28th, 2019
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. from md5 import md5
  2.  
  3. # header from 401 response on REGISTER
  4. # Authorization: Digest username="883140776410950", realm="gw_youmagic", algorithm=MD5, uri="sip:GW_Youmagic", nonce="1476157437:0a1418a40f8ee1c9a55f1587ab931c14", response="3ff479ccc24874f66aae45dac889d099"
  5.  
  6. login = '883140776410950'
  7. uri = 'sip:GW_Youmagic'
  8. nonce = '1476157437:0a1418a40f8ee1c9a55f1587ab931c14'
  9. realm = 'gw_youmagic'
  10. password = '----------'
  11.  
  12. str1 = md5("{}:{}:{}".format(login,realm,password)).hexdigest()
  13. str2 = md5("REGISTER:{}".format(uri)).hexdigest()
  14. str3 = md5("{}:{}:{}".format(str1,nonce,str2)).hexdigest()
  15. print str3
Add Comment
Please, Sign In to add comment