Im having trouble using the telnetlib in python, when Im doing a telnet call from the shell, everything works ok but when I do it from python, the server(that is a virtual machine) crashes. The question is: what is the different between the python telnet call and the shell telnet call?
#!/usr/bin/python
import telnetlib
import socket
import sys
def ConnectToVM():
host = "192.168.236.3";
port = 8110;
try:
tn = telnetlib.Telnet(host, port);
except (socket.error, EOFError) as e:
print(e);
def main():
ConnectToVM();
#anropa main
main();