Make sure @shares is initialized

Fixes a stack trace when the target isn't Windows
This commit is contained in:
James Lee 2012-04-10 15:00:47 -06:00
parent a8cd28d6d5
commit 090566610a
1 changed files with 1 additions and 1 deletions

View File

@ -36,9 +36,9 @@ class Metasploit3 < Msf::Auxiliary
"1.3.6.1.4.1.77.1.2.27.1.2",
"1.3.6.1.4.1.77.1.2.27.1.3"]
@shares = []
if snmp.get_value('sysDescr.0') =~ /Windows/
@shares = []
snmp.walk(share_tbl) do |entry|
@shares << entry.collect{|x|x.value}
end