Skip to content
Snippets Groups Projects
Commit ff4d1103 authored by yyang192's avatar yyang192
Browse files

Delete telnet_console.py

parent c3b36a36
No related branches found
No related tags found
No related merge requests found
import getpass
import sys
import telnetlib
def telnet_console(PORT, cmd):
HOST = "127.0.0.1"
tn = telnetlib.Telnet(HOST, 5000)
tn.read_very_eager().decode('ascii')
tn.write(cmd.encode('ascii') + b"\r\n")
data = tn.read_until("R1#".encode()).decode('ascii')
return data
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment