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