Skip Menu |

This queue is for tickets about the Net-Telnet CPAN distribution.

Report information
The Basics
Id: 102243
Status: rejected
Priority: 0/
Queue: Net-Telnet

People
Owner: Nobody in particular
Requestors: mickvav [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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")
For non-standard login prompts use a combination of print() and waitfor() as an alternative. This is documented in the Net::Telnet section "What To Know Before Using". There is also an example in the Examples section. On Fri Feb 20 04:50:49 2015, http://openid-provider.appspot.com/mickvav wrote: Show quoted text
> 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.