Skip to content

Commit 2bb0bd5

Browse files
committed
Makign changes recommended in redmine 7945 to fix SNMP enum module failing to catch some fail cases
1 parent b34c3fb commit 2bb0bd5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/auxiliary/scanner/snmp/snmp_enum.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def run_host(ip)
8484

8585
systemDate = snmp.get_value('1.3.6.1.2.1.25.1.2.0')
8686
str = systemDate.to_s
87-
if (str.empty? or str =~ /Null/)
87+
if (str.empty? or str =~ /Null/ or str =~ /^noSuch/)
8888
output_data["System date"] = '-'
8989
else
9090

@@ -653,7 +653,7 @@ def run_host(ip)
653653
end
654654

655655
hrFSRemoteMountPoint = snmp.get_value('1.3.6.1.2.1.25.3.8.1.3.1')
656-
if hrFSRemoteMountPoint.to_s !~ /Null/
656+
if hrFSRemoteMountPoint.to_s !~ /Null/ and hrFSRemoteMountPoint.to_s !~ /^noSuch/
657657
if hrFSRemoteMountPoint.empty?
658658
hrFSRemoteMountPoint = '-'
659659
end

0 commit comments

Comments
 (0)