Subject: | Fix login for devices that ask for "User name" |
Problem - I've found a couple of devices like Eltex MES-3124F 28-port Fiber 1G/10G Managed Switch, which ask you for "User name" (yes, with space between "user" and "name").
I've made a tiny patch which solves the problem and it would be great if it will be incorporated in distribution.
Subject: | username.patch |
*** Telnet.pm 2013-04-22 02:10:20.000000000 +0400
--- ../../../Telnet.pm 2015-02-20 12:46:48.000000000 +0300
***************
*** 1307,1313 ****
## Wait for login prompt.
$self->waitfor(Match => '/login[: ]*$/i',
! Match => '/username[: ]*$/i',
Errmode => "return")
or do {
return &$error("eof read waiting for login prompt")
--- 1307,1313 ----
## Wait for login prompt.
$self->waitfor(Match => '/login[: ]*$/i',
! Match => '/user *name[: ]*$/i',
Errmode => "return")
or do {
return &$error("eof read waiting for login prompt")