Recognize RO vs RW strings

git-svn-id: file:///home/svn/framework3/trunk@11337 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2010-12-14 20:52:48 +00:00
parent 55b21d4aaf
commit 93c26125aa
1 changed files with 8 additions and 2 deletions

View File

@ -110,11 +110,17 @@ module Auxiliary::Cisco
scomm = $1.strip
print_good("#{thost}:#{tport} SNMP Community (#{stype}): #{scomm}")
if stype.downcase == "ro"
ptype = "password_ro"
else
ptype = "password"
end
cred = cred_info.dup
cred[:sname] = "snmp"
cred[:pass] = scomm
cred[:type] = "password"
cred[:collect_type] = "password"
cred[:type] = ptype
cred[:collect_type] = ptype
cred[:proto] = "udp"
cred[:port] = 161
store_cred(cred)