Advertisement
Guest User

simple telnet

a guest
Jun 17th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. #!usr/bin/python
  2. import telnetlib
  3. HOST = "MY IP ADDRESS"
  4. PORT=23
  5. TIMEOUT=10
  6. user = "LV5333"
  7. password = "LV5333"
  8. tn = telnetlib.Telnet(HOST)
  9. tn.read_until("login: ")
  10. tn.write(user+"\n")
  11. tn.read_until("Password: ")
  12. tn.write(password+"\n")
  13. tn.write("WAVEFORM\n") # <-- Put your command here DO NOT FORGET Newline \n
  14. tn.write("bye\n")
  15. print tn.read_all()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement