TelnetServer icon indicating copy to clipboard operation
TelnetServer copied to clipboard

login using telnetlib python

Open MohammedTayeh1993 opened this issue 3 years ago • 0 comments

i have edit login input from Login : to Username: and i try to login it using

        tn = telnetlib.Telnet(ip, int(port), int(timeOut))
        xx = tn.read_until(b"Username: " , timeout=5)
        print(xx)
        tn.write(user.encode('ascii') + b"\n" )
        if password:
            tn.read_until(b"Password: " , timeout=5)
            tn.write(password.encode('ascii') + b"\n")

        print("asdasdasd")
        data = tn.read_all().decode('ascii')

login not working

MohammedTayeh1993 avatar Jul 12 '22 17:07 MohammedTayeh1993