having problems. Can anyone see where I'm going wrong? It works fine until the read_all() statement(watched it w/ sniffer)
import getpass
import sys
import telnetlib
host = raw_input("Enter target host: "
user = raw_input("Enter your username: "
password = getpass.getpass("Enter your password: "
tn = telnetlib.Telnet(host)
tn.read_until("Username: "
tn.write(user + "\n"
if password:
tn.read_until("Password: "
tn.write(password + "\n"
tn.write("enable\n"
tn.read_until("Password: "
tn.write(password + "\n"
tn.write("set length 0\n"
tn.write("set logging session disable\n"
while 1:
command=raw_input("[shell]: "
telnet.write(command + "\n"
if command == "exit":
break
telnet.read_all()
----------------------------------------
Wasabi Pop Tarts! Write Kellogs today!
import getpass
import sys
import telnetlib
host = raw_input("Enter target host: "
user = raw_input("Enter your username: "
password = getpass.getpass("Enter your password: "
tn = telnetlib.Telnet(host)
tn.read_until("Username: "
tn.write(user + "\n"
if password:
tn.read_until("Password: "
tn.write(password + "\n"
tn.write("enable\n"
tn.read_until("Password: "
tn.write(password + "\n"
tn.write("set length 0\n"
tn.write("set logging session disable\n"
while 1:
command=raw_input("[shell]: "
telnet.write(command + "\n"
if command == "exit":
break
telnet.read_all()
----------------------------------------
Wasabi Pop Tarts! Write Kellogs today!