Advertisement
Guest User

shit

a guest
Jan 22nd, 2016
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. #!/usr/bin/env python
  2.  
  3. import sys, os, socket, threading
  4. import paramiko, base64
  5. strPath = "/home/zveu/Desktop/pyscripts/bfssh/bots.txt"
  6. f = open(strPath)
  7. strip = f.read()
  8. print(strip)
  9. stru = "/home/zveu/Desktop/pyscripts/bfssh/users.txt"
  10. f = open(stru)
  11. struser = f.read()
  12. print(struser)
  13. blockSize=65536*16
  14. server = host = "localhost"
  15. port = 22
  16. buf = 1024
  17. addr =(host,port)
  18. user = "zveu"
  19. passwrd = "zveu123"
  20.  
  21. t = paramiko.Transport(strip)
  22. t.connect(username=user, password=passwrd)
  23. chan = t.open_session()
  24.  
  25. print ("Connected")
  26. chan.exec_command('')
  27. for line in chan.makefile('r+'):
  28. print line.strip('\n')
  29. t.close()
  30. chan.close
  31. t = paramiko.Transport(strip)
  32. t.connect(username=user, password=passwrd)
  33. chan = t.open_session()
  34.  
  35. print ("Connected")
  36. chan.exec_command('')
  37. for line in chan.makefile('r+'):
  38. print line.strip('\n')
  39. t.close()
  40. chan.close
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement