Skip to content

Commit 785b538

Browse files
committed
Land rapid7#3399, print_error instead of print_status
2 parents 832d22c + c89cd24 commit 785b538

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

modules/auxiliary/scanner/snmp/snmp_enum.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -946,17 +946,17 @@ def run_host(ip)
946946

947947

948948
rescue SNMP::RequestTimeout
949-
vprint_status("#{ip} SNMP request timeout.")
949+
print_error("#{ip} SNMP request timeout.")
950950
rescue Rex::ConnectionError
951-
print_status("#{ip} Connection refused.")
951+
print_error("#{ip} Connection refused.")
952952
rescue SNMP::InvalidIpAddress
953-
print_status("#{ip} Invalid IP Address. Check it with 'snmpwalk tool'.")
953+
print_error("#{ip} Invalid IP Address. Check it with 'snmpwalk tool'.")
954954
rescue SNMP::UnsupportedVersion
955-
print_status("#{ip} Unsupported SNMP version specified. Select from '1' or '2c'.")
955+
print_error("#{ip} Unsupported SNMP version specified. Select from '1' or '2c'.")
956956
rescue ::Interrupt
957957
raise $!
958958
rescue ::Exception => e
959-
print_status("Unknown error: #{e.class} #{e}")
959+
print_error("Unknown error: #{e.class} #{e}")
960960
elog("Unknown error: #{e.class} #{e}")
961961
elog("Call stack:\n#{e.backtrace.join "\n"}")
962962
ensure

modules/auxiliary/scanner/snmp/snmp_enum_hp_laserjet.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,15 +136,15 @@ def run_host(ip)
136136
disconnect_snmp
137137

138138
rescue SNMP::RequestTimeout
139-
vprint_status("#{ip}, SNMP request timeout.")
139+
print_error("#{ip}, SNMP request timeout.")
140140
rescue Errno::ECONNREFUSED
141-
vprint_status("#{ip}, Connection refused.")
141+
print_error("#{ip}, Connection refused.")
142142
rescue SNMP::InvalidIpAddress
143-
vprint_status("#{ip}, Invalid IP Address. Check it with 'snmpwalk tool'.")
143+
print_error("#{ip}, Invalid IP Address. Check it with 'snmpwalk tool'.")
144144
rescue ::Interrupt
145145
raise $!
146146
rescue ::Exception => e
147-
vprint_error("#{ip}, Unknown error: #{e.class} #{e}")
147+
print_error("#{ip}, Unknown error: #{e.class} #{e}")
148148
end
149149
end
150150
end

0 commit comments

Comments
 (0)