http://www.perlmonks.org?node_id=415127

state-o-dis-array has asked for the wisdom of the Perl Monks concerning the following question:

Greetings Monks, I am having trouble logging in with the telnet module. Here is my code:
$telnet->open($host); my $mode = $telnet->telnetmode; if ($mode == 0){$telnet->telnetmode(1)} my $fh = $telnet->input_log("tellog.txt"); $telnet->login($username, $passwd);
tellog.txt is revealing that the password is failing, but I have checked and double checked the username and password. I have both the uname and passwd declared in the form my $username='user'; I also tried double quotes, but no change. As you can see I tried forcing telnetmode to On per another post that I found. I can manually telnet to the host all day with the username and password, but for some reason this code is failing. By the way, I have also tried using waitfor to catch the login and password prompts then print to send them, but this doesn't work either. I'm connecting from SunOS 5.6 to SunOS 5.8. Thanks for any wisdom that can be sent my way. Update: Here are the contents of the dump_log
< 0x00000: ff fd 18 ff fd 1f ff fd 23 ff fd 27 ff fd 24 ÿý.ÿý.ÿ +ý#ÿý'ÿý$ > 0x00000: ff fc 18 ff fc 1f ff fc 23 ff fc 27 ff fc 24 ÿü.ÿü.ÿ +ü#ÿü'ÿü$ < 0x00000: ff fe 18 ff fe 1f ff fe 23 ff fe 27 ff fe 24 0d ÿþ.ÿþ.ÿ +þ#ÿþ'ÿþ$. < 0x00010: 0a 0d 0a 53 75 6e 4f 53 20 35 2e 36 0d 0a 0d 00 ...SunO +S 5.6.... < 0x00020: 0d 0a 0d 00 .... < 0x00000: ff fb 01 ff fb 03 ff fd 01 6c 6f 67 69 6e 3a 20 ÿû.ÿû.ÿ +ý.login: > 0x00000: ff fd 01 ff fd 03 ff fc 01 ÿý.ÿý.ÿ +ü. > 0x00000: some hex values here mylogin.. < 0x00000: ff fe 01 some hex values here ÿþ.mylogin.. < 0x00000: 50 61 73 73 77 6f 72 64 3a 20 Passwor +d: > 0x00000: some hex values here mypassword.. < 0x00000: 0d 0a .. < 0x00000: 4c 6f 67 69 6e 20 69 6e 63 6f 72 72 65 63 74 0d Login i +ncorrect. < 0x00010: 0a . < 0x00000: 6c 6f 67 69 6e 3a 20 login:
Other than seeing that the user name and password being sent are indeed correct, this isn't all that meaningful to me, maybe someone can help shed some light?