Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- import sys, os, socket, threading
- import paramiko, base64
- strPath = "/home/zveu/Desktop/pyscripts/bfssh/bots.txt"
- f = open(strPath)
- strip = f.read()
- print(strip)
- stru = "/home/zveu/Desktop/pyscripts/bfssh/users.txt"
- f = open(stru)
- struser = f.read()
- print(struser)
- blockSize=65536*16
- server = host = "localhost"
- port = 22
- buf = 1024
- addr =(host,port)
- user = "zveu"
- passwrd = "zveu123"
- t = paramiko.Transport(strip)
- t.connect(username=user, password=passwrd)
- chan = t.open_session()
- print ("Connected")
- chan.exec_command('')
- for line in chan.makefile('r+'):
- print line.strip('\n')
- t.close()
- chan.close
- t = paramiko.Transport(strip)
- t.connect(username=user, password=passwrd)
- chan = t.open_session()
- print ("Connected")
- chan.exec_command('')
- for line in chan.makefile('r+'):
- print line.strip('\n')
- t.close()
- chan.close
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement