[rancid] Dell PowerConnect

Doug Hughes doug.hughes at keystonenap.com
Thu Jun 22 18:34:51 UTC 2017


regex are notoriously tough to debug and just take practice.

I think your problem here is that the m syntax is m/<regex here>/

and you appear to be missing the second / that surrounds the regex



On 6/22/2017 2:21 PM, Daniel Schmidt wrote:
> Unmatched ) in regex; marked by <-- HERE in m/^username (\S+)(\s.*)?
> password \S+|\S+) <-- HERE / at /var/lib/rancid/bin/srancid line 336.
>
> I really should get a book on regex, I'm no good at it.  Backslash
> wrong way?
>
>
>
> On Tue, Jun 20, 2017 at 4:56 PM, heasley <heas at shrubbery.net
> <mailto:heas at shrubbery.net>> wrote:
>
>     Mon, Jun 19, 2017 at 11:43:02AM -0600, Daniel Schmidt:
>     > AAA, Dell R1-2401.  Set to SMC, change one line, seems to work fine.
>     >
>     > One annoyance:
>     > - !username admin password <removed>
>     > - !username sysad password <removed>
>     >
>     > The password are no longer removed and they should be.  Thanks Heas.
>
>     Does this handle it? Or does it have an encryption type indicator?
>
>     Index: bin/srancid.in <http://srancid.in>
>     ===================================================================
>     --- bin/srancid.in <http://srancid.in>      (revision 3660)
>     +++ bin/srancid.in <http://srancid.in>      (working copy)
>     @@ -20,6 +20,7 @@
>      #      DELL PowerConnect 62xx
>      #      DELL PowerConnect 7048
>      #      DELL 34xx (partially; configuration is incomplete)
>     +#      DELL R1-2401
>      #
>      use 5.010;
>      no warnings 'uninitialized';
>     @@ -299,6 +300,16 @@
>             /^oob host config/i && ProcessHistory("","","","!$_") && next;
>             /^empty configuration/i && ProcessHistory("","","","!$_")
>     && next;
>
>     +       if (/^username (\S+)(\s.*)? password \S+|\S+)/) {
>     +           if ($filter_pwds >= 1) {
>     +               ProcessHistory("USER","keysort","$1",
>     +                              "!username $1$2 password <removed>\n");
>     +           } else {
>     +               ProcessHistory("USER","keysort","$1","$_");
>     +           }
>     +           next;
>     +       }
>     +
>             if (/^password (\S+) encrypted/ && $filter_pwds > 1) {
>                 ProcessHistory("","","","!password <removed>
>     encrypted\n");
>                 next;
>
>
>
>
> E-Mail to and from me, in connection with the transaction
> of public business, is subject to the Wyoming Public Records
> Act and may be disclosed to third parties.
>
>
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss

-- 
Doug Hughes
Keystone NAP
Fairless Hills, PA
1.844.KEYBLOCK (539.2562) 	

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20170622/9921fe4f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: keystone-nap.png
Type: image/png
Size: 3476 bytes
Desc: not available
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20170622/9921fe4f/attachment.png>


More information about the Rancid-discuss mailing list