We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
from cmath import exp from telnetlib import Telnet import socket sk = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sk.settimeout(2) try: sk.connect(('10.156.0.254', 23)) print("ok") except Exception: print("server port not connect!") sk.close() # tn = Telnet('10.156.0.254') # tn.read_until(b'Username:') # tn.write(b'admin\n') # tn.read_until(b'Password:') # tn.write(b'admin@cd123\n') # tn.read_until(b'[Y/N]') # tn.write(b'N\n') # tn.read_until(b'>') # tn.write(b'sys\n') # tn.read_until(b']') # tn.write(b'int g0/0/28\n') # tn.read_until(b'28]') # tn.write(b'undo shutdown\n') # print(str(tn.read_until(b']'))) # tn.close()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: