Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#898197: snmpcheck isn't working with `snmpwalk'

19 views
Skip to first unread message

g0tmi1k

unread,
May 8, 2018, 12:00:04 PM5/8/18
to

Package: snmpcheck
Version: 1.9-0kali1

snmpcheck isn’t using snmpwalk correctly.
I believe its missing calling ‘-C’.

Example

$ sudo apt -y install snmpd
Reading package lists... Done
Building dependency tree       
Reading state information... Done
snmpd is already the newest version (5.7.3+dfsg-1.8).
The following packages were automatically installed and are no longer required:
  geoclue-2.0 libqt5positioning5 libqt5qml5 libqt5quick5 libqt5sensors5 libqt5webchannel5 libqt5webkit5
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
g0tmi1k@kali-dev:~$
g0tmi1k@kali-dev:~$ sudo systemctl start snmpd
g0tmi1k@kali-dev:~$ 
g0tmi1k@kali-dev:~$ snmpcheck  -x -H -y -f 127.0.0.1
test: .1.3.6.1.4.1.2021.2.1
suff: .2.1
test: .1.3.6.1.4.1.2021.4
suff: 
test: .1.3.6.1.4.1.2021.8.1
suff: .8.1
test: .1.3.6.1.4.1.2021.9.1
suff: .9.1
test: .1.3.6.1.4.1.2021.10.1
suff: .10.1
test: .1.3.6.1.4.1.2021.101
suff: 
No community name specified.s                                              
USAGE: snmpwalk [OPTIONS] AGENT [OID]

  Version:  5.7.3
...SNIP...
              E {OID}:  End the walk at the specified OID
No community name specified.                                               
USAGE: snmpwalk [OPTIONS] AGENT [OID]

  Version:  5.7.3
...SNIP...
              E {OID}:  End the walk at the specified OID
$
``


- - - 


**Patch**

I believe the following patch fixes the issue:

$ git diff
diff --git a/snmpcheck b/snmpcheck
index a69e640..2df103f 100755
--- a/snmpcheck
+++ b/snmpcheck
@@ -27,8 +27,8 @@ $mibupdateconfig="$mibheadall.100.VERUPDATECONFIG";
'.10.1' => 1,
'.101' => 1);
$errlog="/net/tyfon/1/OV/log/ece-log";
-$default_get_args = "-v 1 %s private";
-$default_set_args = "-v 1 %s private";
+$default_get_args = "-v 1 -c private %s";
+$default_set_args = "-v 1 -c private %s";
$andlog=0;
$snmppath="/usr/bin";
$eraseline=" \r";
$
```


Kali Linux Bug Report: https://bugs.kali.org/view.php?id=4655

Raphael Hertzog

unread,
May 8, 2018, 4:40:03 PM5/8/18
to
Control: reassign -1 snmp 5.7.3+dfsg-1.8

On Tue, 08 May 2018, g0tmi1k wrote:
> Package: snmpcheck
> Version: 1.9-0kali1

That's the not the correct package and not the correct version, reassigning.

> snmpcheck isn’t using snmpwalk correctly.
> I believe its missing calling ‘-c’.

Can you post send your bug report to the upstream developers on
sourceforge?

https://sourceforge.net/p/net-snmp/bugs/

Thank you.

> I believe the following patch fixes the issue:
>
> ```
> $ git diff
> diff --git a/snmpcheck b/snmpcheck
> index a69e640..2df103f 100755
> --- a/snmpcheck
> +++ b/snmpcheck
> @@ -27,8 +27,8 @@ $mibupdateconfig="$mibheadall.100.VERUPDATECONFIG";
> '.10.1' => 1,
> '.101' => 1);
> $errlog="/net/tyfon/1/OV/log/ece-log";
> -$default_get_args = "-v 1 %s private";
> -$default_set_args = "-v 1 %s private";
> +$default_get_args = "-v 1 -c private %s";
> +$default_set_args = "-v 1 -c private %s";
> $andlog=0;
> $snmppath="/usr/bin";
> $eraseline="
> \r";
> $
> ```
>
>
> - - -
>
> Kali Linux Bug Report: https://bugs.kali.org/view.php?id=4655
>
>
>
>

--
Raphaël Hertzog ◈ Debian Developer

Support Debian LTS: https://www.freexian.com/services/debian-lts.html
Learn to master Debian: https://debian-handbook.info/get/
0 new messages