[rancid] clogin vs. ascii-art banners with ####es

Per-Olof Olsson peo at chalmers.se
Wed Nov 6 18:14:05 UTC 2013


Alexander Bochmann wrote 2013-11-06 12:07:
> Hi,
>
> I just upgraded our ancient RANCID installation (2.3.2a8) to 2.3.8, and it
> seems enable-mode detection in clogin now barfs on a couple of login banners
> that contain ascii-art made from hash signs. (Yes, I know, those should be easy
> to change, but it seems login ascii-art is serious business...)
>
> clogin doesn't detect that it's not in enable mode yet when hitting such a
> banner, and just starts sending commands, although there still is a > prompt...
>
> The logic in clogin has changed enough between those two versions that I
> neither understand why that used to work in 2.3.2, nor why it doesn't now...
>
> Any hints what I could tweak to get around this problem?
>


Tested out login when banner page have # and > on HP's (hlogin).
Just added

         -re "\[#>]+.*\[\n\r]+" {
             exp_continue
         }

before where prompter is matched in expect login loop.


Login loop will continue if there is return or line feed after # or >.
A normal prompter will not have any return or line feed after # or > it just wait for input.

Think I also tested this on cisco but can't find any trace of this now.

> Best regards,
>
> Alex Bochmann
>
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss
>


/Peo
----------------------------------------------------------
Per-Olof Olsson               Email: peo at chalmers.se
Chalmers tekniska högskola    IT-service
Hörsalsvägen 5                412 96 Göteborg
Tel: 031/772 6738  Fax: 031/772 8680
----------------------------------------------------------


More information about the Rancid-discuss mailing list