From d44bb755a750cd10548b82aa33b96b7ca0f9bcdb Mon Sep 17 00:00:00 2001 From: kkalev Date: Tue, 16 Apr 2002 11:55:40 +0000 Subject: [PATCH] Pass the nas server community as an argument to the snmpfinger script --- bin/snmpfinger | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/snmpfinger b/bin/snmpfinger index b9dda8b..d8e24dc 100755 --- a/bin/snmpfinger +++ b/bin/snmpfinger @@ -1,9 +1,11 @@ #!/usr/bin/perl $SNMPWALK="/usr/bin/snmpwalk"; +$host=shift; +$comm=shift || 'public'; -$walk =`$SNMPWALK $ARGV[0] public .iso.org.dod.internet.private.enterprises.9.2.9.2.1.18`; -$walk.=`$SNMPWALK $ARGV[0] public .iso.org.dod.internet.private.enterprises.9.9.27.1.1.3.1.7`; +$walk =`$SNMPWALK $host $comm .iso.org.dod.internet.private.enterprises.9.2.9.2.1.18`; +$walk.=`$SNMPWALK $host $comm .iso.org.dod.internet.private.enterprises.9.9.27.1.1.3.1.7`; while($walk=~/\"(\w+?)\"/g){ $user=lc($1); -- 2.39.5