mirror of
https://github.com/nmap/nmap.git
synced 2026-01-07 23:19:02 +00:00
Fixed a big in the http library that cropped up while scanning multiple hosts at the same ip address. The reason this occurred is because the result would be cached based on the ip address, not the target name, so different vhosts on the same ip address would be considered the same by the cache.
This commit is contained in:
@@ -555,10 +555,9 @@ local function lookup_cache (method, host, port, path, options)
|
||||
local no_cache = options.no_cache; -- do not save result
|
||||
local no_cache_body = options.no_cache_body; -- do not save body
|
||||
|
||||
if type(host) == "table" then host = host.ip end
|
||||
if type(port) == "table" then port = port.number end
|
||||
|
||||
local key = host..":"..port..":"..path;
|
||||
local key = get_hostname(host)..":"..port..":"..path;
|
||||
local mutex = nmap.mutex(tostring(lookup_cache)..key);
|
||||
|
||||
local state = {
|
||||
|
||||
Reference in New Issue
Block a user