1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-13 19:29:04 +00:00

Don't redundantly list the NULL compressor in ssl-num-ciphers.nse.

This can happen when we ask for a different compressor but the server
replies with NULL instead. Patch by Matt Selsky in
http://seclists.org/nmap-dev/2011/q2/1236.
This commit is contained in:
david
2011-09-14 18:21:23 +00:00
parent 49be2a7c61
commit 1a56b09beb
2 changed files with 6 additions and 2 deletions

View File

@@ -1,6 +1,8 @@
# Nmap Changelog ($Id$); -*-text-*- # Nmap Changelog ($Id$); -*-text-*-
o [NSE] Fixed SSL compressor names in ssl-enum-ciphers.nse. [Matt Selsky] o [NSE] Fixed SSL compressor names in ssl-enum-ciphers.nse, and
removed redundant multiple listings of the NULL compressor.
[Matt Selsky]
o [NSE] Added cipher strength ratings to ssl-enum-ciphers.nse. o [NSE] Added cipher strength ratings to ssl-enum-ciphers.nse.
[Gabriel Lawrence] [Gabriel Lawrence]

View File

@@ -679,12 +679,14 @@ local function try_protocol(host, port, protocol)
stdnse.print_debug(2, "Compressor %s rejected.", name) stdnse.print_debug(2, "Compressor %s rejected.", name)
elseif record["type"] ~= "handshake" or record["body"]["type"] ~= "server_hello" then elseif record["type"] ~= "handshake" or record["body"]["type"] ~= "server_hello" then
stdnse.print_debug(2, "Unexpected record received.") stdnse.print_debug(2, "Unexpected record received.")
elseif record["body"]["compressor"] ~= name then
protocol_worked = true
stdnse.print_debug(2, "Compressor %s rejected.", name)
else else
protocol_worked = true protocol_worked = true
stdnse.print_debug(2, "Compressor %s chosen.", name) stdnse.print_debug(2, "Compressor %s chosen.", name)
-- Add compressor to the list of accepted compressors. -- Add compressor to the list of accepted compressors.
name = record["body"]["compressor"]
table.insert(results, name) table.insert(results, name)
end end
end end