1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-22 07:29:01 +00:00

The NSE HTTP library now uses the host name specified on the command

line when making requests, which improves script scanning against web
servers with virtual hosts. Thanks to Sven Klemm for the patch.
This commit is contained in:
david
2008-05-20 06:13:26 +00:00
parent 7c5fa7a808
commit 8663003c36
2 changed files with 6 additions and 2 deletions

View File

@@ -1,5 +1,9 @@
# Nmap Changelog ($Id$); -*-text-*- # Nmap Changelog ($Id$); -*-text-*-
o The NSE HTTP library now uses the host name specified on the command
line when making requests, which improves script scanning against web
servers with virtual hosts. Thanks to Sven Klemm for the patch.
o Removed a superfluous test for the existence of the C++ compiler in the o Removed a superfluous test for the existence of the C++ compiler in the
configure script. The test was not robust when configured with configure script. The test was not robust when configured with
CXX="ccache g++". Thanks to Rainer Müller for the report. CXX="ccache g++". Thanks to Rainer Müller for the report.

View File

@@ -24,7 +24,7 @@ get = function( host, port, path, options )
options = options or {} options = options or {}
local presets = {Host=host,Connection="close",['User-Agent']="Nmap NSE"} local presets = {Host=host,Connection="close",['User-Agent']="Nmap NSE"}
if type(host) == 'table' then if type(host) == 'table' then
presets['Host'] = ( host.name ~= '' and host.name ) or host.ip presets['Host'] = host.targetname or ( host.name ~= '' and host.name ) or host.ip
end end
local header = options.header or {} local header = options.header or {}
@@ -72,7 +72,7 @@ request = function( host, port, data, options )
options = options or {} options = options or {}
if type(host) == 'table' then if type(host) == 'table' then
host = host.targetname or ( host.name ~= '' and host.name ) or host.ip host = host.ip
end end
local protocol = 'tcp' local protocol = 'tcp'