Skip to content

Commit 0cda20c

Browse files
committed
Fix everything pointed out by @jlee-r7
1 parent 17a1f2e commit 0cda20c

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

modules/auxiliary/scanner/db2/discovery.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ def run_host(ip)
4646
:proto => 'udp',
4747
:port => datastore['RPORT'],
4848
:type => 'SERVICE_INFO',
49-
:data => res[2] + "_" + res[1]
49+
:data => "#{res[2]}_#{res[1]}"
5050
)
5151

5252
report_service(
5353
:host => ip,
5454
:port => datastore['RPORT'],
5555
:proto => 'udp',
5656
:name => "ibm-db2",
57-
:info => res[2] + "_" + res[1]
57+
:info => "#{res[2]}_#{res[1]}"
5858
)
5959

6060
print_status("Host #{ip} node name is " + res[2] + " with a product id of " + res[1] )

modules/auxiliary/scanner/motorola/timbuktu_udp.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,6 @@ def run_host(ip)
5252
else
5353
print_error("Unable to determine info for #{ip}...")
5454
end
55-
rescue ::Errno::EPIPE, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout, ::Rex::ConnectionRefused => e
56-
vprint_error(e.message)
57-
elog("#{e.class} #{e.message}\n#{e.backtrace * "\n"}")
5855
ensure
5956
disconnect_udp
6057
end

modules/auxiliary/scanner/sap/sap_router_info_request.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,11 @@ def run_host(ip)
109109
print_good("#{host_port} - Connected to saprouter")
110110
print_good("#{host_port} - Sending ROUTER_ADM packet info request")
111111
sock.put(ni_packet)
112-
packet_len = sock.read(4).to_s.unpack('H*')[0].to_i 16
112+
sock_res = sock.read(4)
113+
unless sock_res
114+
fail_with(Failure::Unknown, 'Unable to get the packet length')
115+
end
116+
packet_len = sock_res.unpack('H*')[0].to_i 16
113117
print_good("#{host_port} - Got INFO response")
114118
while packet_len !=0
115119
count += 1

0 commit comments

Comments
 (0)