[rancid] Cisco Banner Issue

Per-Olof Olsson peo at chalmers.se
Fri Mar 21 10:22:31 UTC 2014


Alan McKinnon skrev 2014-03-20 16:26:
> On 20/03/2014 16:13, Alex DEKKER wrote:
>> On 20/03/14 09:59, Alan McKinnon wrote:
>>> On 20/03/2014 11:27, Hans Mueller wrote:
>>>> *     Auftragsnummer: XY#763743                          *
>>>> One possibility is ignore lines containing "#" that also have whitespace
>>>> earlier in the line. Those always seem to be banner text and real-life
>>>> cli prompts seldom contain whitespace
>>>>
>> Yeah, surely the only time that the # is a prompt is when it's the last
>> character on a line *and* no further output is forthcoming?
>>
>> alexd
>
>
>
> In an ideal, theoretical world that is true. Neither of us live in such
> a world and prompts are often not what they should be.
>
>

Yes and it's simple to fix.

*** clogin      2014-03-21 11:14:48.163493260 +0100
--- clogin.new  2014-03-21 11:06:19.711260482 +0100
***************
*** 572,577 ****
--- 572,580 ----
                                   send -- "$passphrase\r"
                                   exp_continue
                                 }
+       -re "\[#>]+\[^\r\n]*\[\r\n]+" {
+                               exp_continue
+                               }
         -re "$u_prompt"         {
                                   send -- "$user\r"
                                   set uprompt_seen 1


Also tested and include in hlogin.

Then you can have how many # and > you like in banners.


/Peo
----------------------------------------------------------
Per-Olof Olsson               Email: peo at chalmers.se
Chalmers tekniska högskola    IT-service
Arvid Hedvalls backe 6        412 96 Göteborg
Tel: 031/772 6738  Fax: 031/772 8680
----------------------------------------------------------


More information about the Rancid-discuss mailing list