Skip to content

Instantly share code, notes, and snippets.

@sejr
Last active June 24, 2024 11:46
Show Gist options
  • Select an option

  • Save sejr/08e60505eb99689c7727 to your computer and use it in GitHub Desktop.

Select an option

Save sejr/08e60505eb99689c7727 to your computer and use it in GitHub Desktop.
Python Telnet
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()
@lexsasex

Copy link
Copy Markdown

a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment