Advertisement
Guest User

Untitled

a guest
Jan 16th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. import sys
  2. import telnetlib
  3.  
  4. HOST = '10.25.0.10'
  5. user = 'cctc'
  6. password = 'dangermouse'
  7.  
  8. tn = telnetlib.Telnet(HOST)
  9.  
  10. tn.read_until("login: ")
  11. tn.write(user + "\n")
  12. if password:
  13. tn.read_until("Password: ")
  14. tn.write(password + "\n")
  15.  
  16. tn.write("ls\n")
  17.  
  18. tn.interact()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement