Home page logo

nmap-dev logo Nmap Development mailing list archives

[NSE] Need testers for improved SNMP library
From: Daniel Miller <bonsaiviking () gmail com>
Date: Sun, 2 Mar 2014 07:47:27 -0600


It's been bugging me for a while how poorly the SNMP NSE library
handled community strings. Essentially, there is a single place in the
registry to store a community string, regardless of whether different
hosts have different communities. The snmp-brute script overwrites
this single place (nmap.registry.snmpcommunity) every time it finishes
a host, so the scripts that rely on it to set the community could be
using the wrong one.

The attached patch adds a Helper class to handle choosing the
community and all the socket communication. Now the discovered
communities are stored in host.registry.snmpcommunity, so each host
can be handled separately. Moving all the socket communication into
the library means this patch actually reduces the number of lines of
code in NSE.

I need testers. I haven't tested this at all myself, though I will be
doing so on Monday, but I am confident that it should work as
expected. Thanks!


Attachment: snmp-helper.diff

Sent through the dev mailing list
Archived at http://seclists.org/nmap-dev/

  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]