История изменений
Исправление
int13h,
(текущая версия)
:
https://docs.python.org/2/library/telnetlib.html
[code] mport getpass import sys import telnetlib
HOST = «localhost» user = raw_input("Enter your remote account: ") password = getpass.getpass()
tn = telnetlib.Telnet(HOST)
tn.read_until("login: ") tn.write(user + «\n») if password: tn.read_until("Password: ") tn.write(password + «\n»)
tn.write(«ls\n») tn.write(«exit\n»)
print tn.read_all() [/code]
Исходная версия
int13h,
:
https://docs.python.org/2/library/telnetlib.html
[code=python] mport getpass import sys import telnetlib
HOST = «localhost» user = raw_input("Enter your remote account: ") password = getpass.getpass()
tn = telnetlib.Telnet(HOST)
tn.read_until("login: ") tn.write(user + «\n») if password: tn.read_until("Password: ") tn.write(password + «\n»)
tn.write(«ls\n») tn.write(«exit\n»)
print tn.read_all() [/code]