File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed
modules/auxiliary/scanner/snmp Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -946,17 +946,17 @@ def run_host(ip)
946
946
947
947
948
948
rescue SNMP ::RequestTimeout
949
- vprint_status ( "#{ ip } SNMP request timeout." )
949
+ print_error ( "#{ ip } SNMP request timeout." )
950
950
rescue Rex ::ConnectionError
951
- print_status ( "#{ ip } Connection refused." )
951
+ print_error ( "#{ ip } Connection refused." )
952
952
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'." )
954
954
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'." )
956
956
rescue ::Interrupt
957
957
raise $!
958
958
rescue ::Exception => e
959
- print_status ( "Unknown error: #{ e . class } #{ e } " )
959
+ print_error ( "Unknown error: #{ e . class } #{ e } " )
960
960
elog ( "Unknown error: #{ e . class } #{ e } " )
961
961
elog ( "Call stack:\n #{ e . backtrace . join "\n " } " )
962
962
ensure
Original file line number Diff line number Diff line change @@ -136,15 +136,15 @@ def run_host(ip)
136
136
disconnect_snmp
137
137
138
138
rescue SNMP ::RequestTimeout
139
- vprint_status ( "#{ ip } , SNMP request timeout." )
139
+ print_error ( "#{ ip } , SNMP request timeout." )
140
140
rescue Errno ::ECONNREFUSED
141
- vprint_status ( "#{ ip } , Connection refused." )
141
+ print_error ( "#{ ip } , Connection refused." )
142
142
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'." )
144
144
rescue ::Interrupt
145
145
raise $!
146
146
rescue ::Exception => e
147
- vprint_error ( "#{ ip } , Unknown error: #{ e . class } #{ e } " )
147
+ print_error ( "#{ ip } , Unknown error: #{ e . class } #{ e } " )
148
148
end
149
149
end
150
150
end
You can’t perform that action at this time.
0 commit comments