Skip to content

Commit 827d241

Browse files
committed
Land rapid7#5539, Quake scanner fix
2 parents a149fb5 + fd0b42b commit 827d241

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

modules/auxiliary/scanner/quake/server_info.rb

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,13 @@ def decode_stuff(response)
5555
stuff = decode_info(response)
5656
when 'status'
5757
stuff = decode_status(response)
58+
else
59+
stuff = {}
5860
end
5961

6062
if datastore['VERBOSE']
61-
stuff.inspect
63+
# get everything
64+
stuff
6265
else
6366
# try to get the host name, game name and version
6467
stuff.select { |k, _| %w(hostname sv_hostname gamename com_gamename version).include?(k) }
@@ -68,9 +71,9 @@ def decode_stuff(response)
6871
def scanner_process(response, src_host, src_port)
6972
stuff = decode_stuff(response)
7073
return unless stuff
71-
@results[src_host] ||= []
74+
@results[src_host] ||= {}
7275
print_good("#{src_host}:#{src_port} found '#{stuff}'")
73-
@results[src_host] << stuff
76+
@results[src_host].merge!(stuff)
7477
end
7578

7679
def scanner_postscan(_batch)
@@ -81,7 +84,7 @@ def scanner_postscan(_batch)
8184
proto: 'udp',
8285
port: rport,
8386
name: 'Quake',
84-
info: stuff
87+
info: stuff.inspect
8588
)
8689
end
8790
end

0 commit comments

Comments
 (0)