Advertisement
Guest User

Untitled

a guest
May 16th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | None | 0 0
  1. #!/usr/bin/python
  2. import time
  3. import os
  4. import sys
  5. import socket
  6.  
  7. jews = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  8. accounts = 'accounts.txt'
  9. acctfile = open(accounts,'rw')
  10. for line in acctfile:
  11.   ssh_data = line
  12.   ssh_exploded = ssh_data.split(',')
  13.   ssh_host = ssh_exploded[0]
  14.   ssh_user = ssh_exploded[1]
  15.   ssh_pass = ssh_exploded[2]
  16.   ssh_port = ssh_exploded[3]
  17.   try:
  18.     jews.connect((ssh_host,int(ssh_port)))
  19.     jews.shutdown(2)
  20.     print ssh_host + ',' + ssh_user + ',' + ssh_pass + ',' + ssh_port
  21.   except:
  22.     time.sleep(0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement