From 762207f02e5fdd1060f8f72d040755efe8bc06ca Mon Sep 17 00:00:00 2001 From: dmiller Date: Wed, 1 Aug 2012 17:50:00 +0000 Subject: [PATCH] Handle empty snmpcommunity correctly --- scripts/snmp-brute.nse | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/snmp-brute.nse b/scripts/snmp-brute.nse index cd6a72c44..6ecfd4299 100644 --- a/scripts/snmp-brute.nse +++ b/scripts/snmp-brute.nse @@ -276,7 +276,11 @@ action = function(host, port) if creds_iter then local account = creds_iter() if account then - nmap.registry.snmpcommunity = account.pass + if account.pass == "" then + nmap.registry.snmpcommunity = "" + else + nmap.registry.snmpcommunity = account.pass + end end end