SHARE
TWEET

Yo.py

a guest Jul 20th, 2017 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import sys, re, os, paramiko, socket
  2. from multiprocessing import Process
  3.  
  4. if len(sys.argv) < 2:
  5.     sys.exit("\033[37mUsage: python "+sys.argv[0]+" [vuln list]")
  6.  
  7. paramiko.util.log_to_file("/dev/null")
  8. r34d = open(str(sys.argv[1]),'a+')
  9. print "\033[31mStarting Scan!\n"
  10. def w0rk(ip):
  11.     try:
  12.         port = 22
  13.         sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  14.         result = sock.connect_ex((ip, port))
  15.         if result == 0:
  16.             print "\033[32mAdding: \033[37m"+ip
  17.             os.system("echo -en '"+username+":"+password+":"+ip+"' >>active.txt")
  18.         elif result != 0:
  19.             print "\033[31mDEAD: \033[37m"+ip
  20.         sock.close()
  21.     except:
  22.         pass
  23. for line in r34d:
  24.     ip_1nfo = line.split(":")
  25.     g0d = Process(target=w0rk, args=(ip_1nfo[2],))
  26.     g0d.start()
  27.     username=ip_1nfo[0]
  28.     password=ip_1nfo[1]
  29.     ip=ip_1nfo[2]
  30. g0d.join()
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
 
Top