Skip Menu |

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

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

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

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



Subject: Patch for support EdgeCore devices
EdgeCore L2 devices tries to emulate Cisco IOS CLI, but does this a bit incorrectly. My 3-lines patch fixes behaviour of enable() function.
Subject: Net-Telnet-Cisco.pm.edgecore-enable.patch
--- Cisco.pm.orig 2002-06-18 21:17:03.000000000 +0400 +++ Cisco.pm 2008-10-03 14:21:57.000000000 +0400 @@ -555,6 +555,7 @@ -match => '/[Uu]sername[:\s]*$/', -match => '/[Pp]assw(?:or)?d[:\s]*$/', -match => '/(?i:Passcode)[:\s]*$/', + -match => '/^\x0A\x0D.+/', -match => "/$old_prompt/", ) or do { return &$error("read eof waiting for enable login or password prompt") @@ -582,6 +583,8 @@ } elsif ($match =~ /$old_prompt/) { ## Success! Exit the block. last; + } elsif ($match =~ /^\x0A\x0D(.+)/) { + last if $1 =~ /$old_prompt/; } else { return &$error("enable received unexpected prompt. Aborting."); }
The devices in question (EdgeCore) are not Cisco. Feel free to fork this and create Net::Telnet::EdgeCore.