Last active
June 24, 2024 11:46
-
-
Save sejr/08e60505eb99689c7727 to your computer and use it in GitHub Desktop.
Python Telnet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| import getpass | |
| import telnetlib | |
| import socket | |
| host = "192.168.9.130" | |
| port = 25564 | |
| username = raw_input("Username: ") | |
| password = getpass.getpass() | |
| telnet_connection = telnetlib.Telnet(host, port) | |
| telnet_connection.write(username + "\n") | |
| telnet_connection.write(password + "\n") | |
| telnet_connection.write("\n") | |
| telnet_connection.read_all() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
a