diff options
Diffstat (limited to 'bin')
-rw-r--r-- | bin/Makefile.in | 40 | ||||
-rw-r--r-- | bin/clogin.in | 8 | ||||
-rw-r--r-- | bin/francid.in | 16 | ||||
-rw-r--r-- | bin/hlogin.in | 10 | ||||
-rw-r--r-- | bin/jerancid.in | 6 | ||||
-rw-r--r-- | bin/jrancid.in | 8 | ||||
-rw-r--r-- | bin/lg.cgi.in | 4 | ||||
-rw-r--r-- | bin/nlogin.in | 6 | ||||
-rw-r--r-- | bin/rancid.in | 19 |
9 files changed, 79 insertions, 38 deletions
diff --git a/bin/Makefile.in b/bin/Makefile.in index dac26ed..99a55ca 100644 --- a/bin/Makefile.in +++ b/bin/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.8 from Makefile.am. +# Makefile.in generated by automake 1.8.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -69,7 +69,7 @@ CONFIG_CLEAN_FILES = control_rancid par rancid-fe alogin arancid \ jerancid hlogin hrancid htlogin htrancid mrancid nlogin \ nrancid nslogin nsrancid prancid rivlogin rivrancid rrancid \ tntlogin tntrancid xrancid zrancid -am__installdirs = $(DESTDIR)$(bindir) $(DESTDIR)$(bindir) +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_hpuifilter_OBJECTS = hpuifilter.$(OBJEXT) @@ -347,14 +347,14 @@ zrancid: $(top_builddir)/config.status $(srcdir)/zrancid.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - $(mkdir_p) $(DESTDIR)$(bindir) + test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \ - $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \ + echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done @@ -362,8 +362,8 @@ uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f $(DESTDIR)$(bindir)/$$f"; \ - rm -f $(DESTDIR)$(bindir)/$$f; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: @@ -373,13 +373,13 @@ hpuifilter$(EXEEXT): $(hpuifilter_OBJECTS) $(hpuifilter_DEPENDENCIES) $(LINK) $(hpuifilter_LDFLAGS) $(hpuifilter_OBJECTS) $(hpuifilter_LDADD) $(LIBS) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) - $(mkdir_p) $(DESTDIR)$(bindir) + test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f $$d$$p; then \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " $(binSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(bindir)/$$f"; \ - $(binSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(bindir)/$$f; \ + echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ else :; fi; \ done @@ -387,8 +387,8 @@ uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; for p in $$list; do \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " rm -f $(DESTDIR)$(bindir)/$$f"; \ - rm -f $(DESTDIR)$(bindir)/$$f; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ done mostlyclean-compile: @@ -436,9 +436,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)$$tags$$unique" \ - || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -z "$$unique" && unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) @@ -493,7 +495,9 @@ check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(SCRIPTS) installdirs: - $(mkdir_p) $(DESTDIR)$(bindir) $(DESTDIR)$(bindir) + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done install: install-am install-exec: install-exec-am install-data: install-data-am diff --git a/bin/clogin.in b/bin/clogin.in index dd8b817..92bb2f8 100644 --- a/bin/clogin.in +++ b/bin/clogin.in @@ -1,6 +1,6 @@ #! @EXPECT_PATH@ -- ## -## $Id: clogin.in,v 1.77 2004/03/12 05:44:06 asp Exp $ +## $Id: clogin.in,v 1.79 2004/05/27 21:57:52 heas Exp $ ## ## Copyright (C) 1997-2004 by Terrapin Communications, Inc. ## All rights reserved. @@ -499,7 +499,7 @@ proc run_commands { prompt command } { send "set length 0\r" # This is ugly, but reduces code duplication, allowing the # subsequent expects to handle everything as normal. - set command "set logging session disable\r;$command" + set command "set logging session disable;$command" } else { send "term length 0\r" } @@ -543,7 +543,7 @@ proc run_commands { prompt command } { } exp_continue } - -re "^ --More--\[^\n\r]*" { + -re "^ *--More--\[^\n\r]*" { send " " exp_continue } -re "^<-+ More -+>\[^\n\r]*" { @@ -573,7 +573,7 @@ proc run_commands { prompt command } { } exp_continue } - -re "^ --More--\[^\n\r]*" { + -re "^ *--More--\[^\n\r]*" { send " " exp_continue } -re "^<-+ More -+>\[^\n\r]*" { diff --git a/bin/francid.in b/bin/francid.in index cc3acd6..31977b9 100644 --- a/bin/francid.in +++ b/bin/francid.in @@ -1,6 +1,6 @@ #! @PERLV_PATH@ ## -## $Id: francid.in,v 1.28 2004/03/03 00:33:48 heas Exp $ +## $Id: francid.in,v 1.29 2004/04/14 21:38:12 heas Exp $ ## ## Copyright (C) 1997-2004 by Terrapin Communications, Inc. ## All rights reserved. @@ -150,9 +150,12 @@ sub ShowVersion { last if(/^$prompt/); next if (/^(The system |Crash time)/); + next if (/^((Active|Standby) Management|LP Slot \d+) uptime is/); s/^\s*(HW|SW)/$1/; s/^\s*(Compiled on)/SW: $1/; + s/^\s*(\(\d+ bytes\) from )/SW: $1/; + #s/^(HW.*)/$1\n/; if (/^SL (\d+)/) { $slot = "Slot $1"; @@ -172,6 +175,8 @@ sub ShowVersion { # This routine parses "show chassis" sub ShowChassis { + my($skip) = 0; + print STDERR " In ShowChassis: $_" if ($debug); while (<INPUT>) { @@ -179,6 +184,15 @@ sub ShowChassis { last if (/^$prompt/); next if (/ from /); next if (/current temperature/i); + + if (/^---/) { # next section reached + $skip = 0; + } + if (/(POWERS|TEMPERATURE READINGS)/) { + $skip = 1; + } + next if $skip; + ProcessHistory("CHASSIS","","","! $_"); } ProcessHistory("CHASSIS","","","!\n"); diff --git a/bin/hlogin.in b/bin/hlogin.in index a98e926..3bf12de 100644 --- a/bin/hlogin.in +++ b/bin/hlogin.in @@ -1,6 +1,6 @@ #! @EXPECT_PATH@ -- ## -## $Id: hlogin.in,v 1.22 2004/02/02 17:38:36 heas Exp $ +## $Id: hlogin.in,v 1.23 2004/04/09 00:06:44 heas Exp $ ## ## Copyright (C) 1997-2004 by Terrapin Communications, Inc. ## All rights reserved. @@ -298,9 +298,9 @@ proc login { router user userpswd passwd enapasswd cmethod cyphertype } { regexp {(telnet|ssh)(:([^[:space:]]+))*} $prog command suffix junk port if [string match "telnet*" $prog] { if {"$port" == ""} { - set retval [ catch {spawn hpuifilter telnet $router} reason ] + set retval [ catch {spawn hpuifilter -- telnet $router} reason ] } else { - set retval [ catch {spawn hpuifilter telnet $router $port} reason ] + set retval [ catch {spawn hpuifilter -- telnet $router $port} reason ] } if { $retval } { send_user "\nError: telnet failed: $reason\n" @@ -308,9 +308,9 @@ proc login { router user userpswd passwd enapasswd cmethod cyphertype } { } } elseif [string match "ssh*" $prog] { if {"$port" == ""} { - set retval [ catch {spawn hpuifilter $sshcmd -c $cyphertype -x -l $user $router} reason ] + set retval [ catch {spawn hpuifilter -- '$sshcmd -c $cyphertype -x -l $user' $router} reason ] } else { - set retval [ catch {spawn hpuifilter $sshcmd -c $cyphertype -p $port -x -l $user $router} reason ] + set retval [ catch {spawn hpuifilter -- $sshcmd -c $cyphertype -p $port -x -l $user $router} reason ] } if { $retval } { send_user "\nError: $sshcmd failed: $reason\n" diff --git a/bin/jerancid.in b/bin/jerancid.in index 1b72737..50da62b 100644 --- a/bin/jerancid.in +++ b/bin/jerancid.in @@ -1,6 +1,6 @@ #! @PERLV_PATH@ ## -## $Id: jerancid.in,v 1.25 2004/01/11 03:49:13 heas Exp $ +## $Id: jerancid.in,v 1.26 2004/06/04 18:07:37 heas Exp $ ## ## Copyright (C) 1997-2004 by Terrapin Communications, Inc. ## All rights reserved. @@ -203,6 +203,8 @@ sub ShowEnv { next if (/^(\s*|\s*$cmd\s*)$/); next if (/^Please wait/i); return(-1) if (/command authorization failed/i); + # fail if the RP is amid the auto-sync process + return(-1) if (/auto-sync enabled/ && !/in sync/); # skip the temperature goop if (/processor\s+processor/) { @@ -260,6 +262,8 @@ sub DirSlotN { next if (/^(\s*|\s*$cmd\s*)$/); next if (/^Please wait/i); next if (/^system\.log/); + # fail if the RP is amid the auto-sync process + return(-1) if (/active\/standby/ && !/not sync/); ProcessHistory("FLASH","","","!Flash: $_"); } diff --git a/bin/jrancid.in b/bin/jrancid.in index 1217931..b05feb8 100644 --- a/bin/jrancid.in +++ b/bin/jrancid.in @@ -1,6 +1,6 @@ #! @PERLV_PATH@ ## -## $Id: jrancid.in,v 1.59 2004/03/11 23:58:59 heas Exp $ +## $Id: jrancid.in,v 1.61 2004/06/05 04:02:08 asp Exp $ ## ## Copyright (C) 1997-2004 by Terrapin Communications, Inc. ## All rights reserved. @@ -322,6 +322,7 @@ sub ShowChassisSCB { /^\s+\^/ && return; /syntax error/ && return; / Temperature/ && next; + / temperature/ && next; / utilization/ && next; / Start time/ && next; / Uptime/ && next; @@ -424,6 +425,7 @@ sub ShowConfiguration { /^version .*;\d+$/ && return(-1); s/ # SECRET-DATA$//; + s/ ## SECRET-DATA$//; # filter snmp community, when in snmp { stanza } /^snmp/ && $snmp++; /^}/ && ($snmp = 0); @@ -436,6 +438,10 @@ sub ShowConfiguration { ProcessHistory("","","","#$1<removed>$'"); next; } + if (/(\s*md5 \d+ key )[^ ;]+/ && $filter_pwds >= 1) { + ProcessHistory("","","","#$1<removed>$'"); + next; + } if (/(\s*hello-authentication-key )[^ ;]+/ && $filter_pwds >= 1) { ProcessHistory("","","","#$1<removed>$'"); next; diff --git a/bin/lg.cgi.in b/bin/lg.cgi.in index 8b09847..ea0b54e 100644 --- a/bin/lg.cgi.in +++ b/bin/lg.cgi.in @@ -1,6 +1,6 @@ #! @PERLV_PATH@ ## -## $Id: lg.cgi.in,v 1.50 2004/03/10 23:01:28 heas Exp $ +## $Id: lg.cgi.in,v 1.51 2004/05/19 22:59:18 heas Exp $ ## ## Copyright (C) 1997-2004 by Terrapin Communications, Inc. ## All rights reserved. @@ -453,7 +453,7 @@ if (!defined($type) || !defined($router) || $router eq "") { "a clue.\n"); } -if ($arg !~ /^[-A-Za-z0-9|_\/ \.^\$]*$/) { +if ($arg !~ /^[-A-Za-z0-9|_\/: \.^\$]*$/) { &Error("Funny characters in argument; ignoring.\n"); } if (length($arg) >= 50) { diff --git a/bin/nlogin.in b/bin/nlogin.in index 9c6f8b8..756fbef 100644 --- a/bin/nlogin.in +++ b/bin/nlogin.in @@ -1,6 +1,6 @@ #! @EXPECT_PATH@ -- ## -## $Id: nlogin.in,v 1.15 2004/02/02 17:38:36 heas Exp $ +## $Id: nlogin.in,v 1.17 2004/05/21 19:28:49 heas Exp $ ## ## Copyright (C) 1997-2004 by Terrapin Communications, Inc. ## All rights reserved. @@ -433,7 +433,7 @@ foreach firewall [lrange $argv $i end] { send_user "\nError: no password for $firewall in $password_file.\n" continue } - set passwd [join [lindex $pswd 0]""] + set passwd [join [lindex $pswd 0] ""] set enapasswd [join [lindex $pswd 1] ""] } @@ -478,7 +478,7 @@ foreach firewall [lrange $argv $i end] { if { "$cmethod" == "" } { set cmethod {{telnet} {ssh}} } # Figure out the SSH executable name - set sshcmd [find sshcmd $router] + set sshcmd [find sshcmd $firewall] if { "$sshcmd" == "" } { set sshcmd {ssh} } # Login to the firewall diff --git a/bin/rancid.in b/bin/rancid.in index 4bc83ef..77d7d17 100644 --- a/bin/rancid.in +++ b/bin/rancid.in @@ -1,6 +1,6 @@ #! @PERLV_PATH@ ## -## $Id: rancid.in,v 1.172 2004/03/14 16:57:05 heas Exp $ +## $Id: rancid.in,v 1.174 2004/05/27 22:08:28 heas Exp $ ## ## Copyright (C) 1997-2004 by Terrapin Communications, Inc. ## All rights reserved. @@ -354,6 +354,7 @@ sub ShowRedundancy { tr/\015//d; last if(/^$prompt/); next if(/^(\s*|\s*$cmd\s*)$/); + return(1) if /(Invalid input detected|Type help or )/; # the pager can not be disabled per-session on the PIX s/^<-+ More -+>\s*//; @@ -377,6 +378,7 @@ sub ShowIDprom { tr/\015//d; last if(/^$prompt/); next if(/^(\s*|\s*$cmd\s*)$/); + return(1) if /(Invalid input detected|Type help or )/; # the pager can not be disabled per-session on the PIX s/^<-+ More -+>\s*//; @@ -1129,6 +1131,7 @@ sub WriteTerm { tr/\015//d; last if(/^$prompt/); return(-1) if (/command authorization failed/i); + return(1) if /(Invalid input detected|Type help or )/; # the pager can not be disabled per-session on the PIX s/^<-+ More -+>\s*//; /Non-Volatile memory is in use/ && return(-1); # NvRAM is locked @@ -1188,9 +1191,9 @@ sub WriteTerm { next; } if (/^username (\S+)(\s.*)? password ((\d) \S+|\S+)/) { - if ($filter_pwds == 2) { + if ($filter_pwds >= 2) { ProcessHistory("USER","keysort","$1","!username $1$2 password <removed>\n"); - } elsif ($filter_pwds == 1 && $4 ne "5"){ + } elsif ($filter_pwds >= 1 && $4 ne "5"){ ProcessHistory("USER","keysort","$1","!username $1$2 password <removed>\n"); } else { ProcessHistory("USER","keysort","$1","$_"); @@ -1209,6 +1212,10 @@ sub WriteTerm { ProcessHistory("LINE-PASS","","","!$1password <removed>\n"); next; } + if (/^(\s*)secret / && $filter_pwds >= 2) { + ProcessHistory("LINE-PASS","","","!$1secret <removed>\n"); + next; + } if (/^\s*neighbor (\S*) password / && $filter_pwds >= 1) { ProcessHistory("","","","! neighbor $1 password <removed>\n"); next; @@ -1432,6 +1439,9 @@ sub DoNothing {print STDOUT;} 'dir /all disk1:' => "DirSlotN", 'dir /all slot2:' => "DirSlotN", 'dir /all disk2:' => "DirSlotN", + 'dir /all harddisk:' => "DirSlotN", + 'dir /all harddiska:' => "DirSlotN", + 'dir /all harddiskb:' => "DirSlotN", "dir /all sup-bootflash:"=> "DirSlotN", # cat 6500-ios "dir /all sup-microcode:"=> "DirSlotN", # cat 6500-ios 'dir /all slavenvram:' => "DirSlotN", @@ -1485,6 +1495,9 @@ sub DoNothing {print STDOUT;} "dir /all disk1:", "dir /all slot2:", "dir /all disk2:", + "dir /all harddisk:", + "dir /all harddiska:", + "dir /all harddiskb:", "dir /all sup-bootflash:", "dir /all sup-microcode:", "dir /all slavenvram:", |