mirror of
https://github.com/nmap/nmap.git
synced 2026-01-28 09:09:02 +00:00
o [NSE] Added support for detecting whether a http connection was established
using SSL or not by the http.lua library [Patrik]
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
# Nmap Changelog ($Id$); -*-text-*-
|
||||
|
||||
o [NSE] Added support for detecting whether a http connection was established
|
||||
using SSL or not by the http.lua library [Patrik]
|
||||
|
||||
o [NSE] Applied patch that replaces a number of GET requests to HEAD in http-
|
||||
fingerprints.lua where no matching was performed on the returned contents.
|
||||
[Hani Benhabiles]
|
||||
|
||||
@@ -1113,7 +1113,7 @@ local function request(host, port, data, options)
|
||||
return nil
|
||||
end
|
||||
local method
|
||||
local header, partial
|
||||
local header
|
||||
local response
|
||||
|
||||
options = options or {}
|
||||
@@ -1126,11 +1126,10 @@ local function request(host, port, data, options)
|
||||
end
|
||||
|
||||
local error_response = {status=nil,["status-line"]=nil,header={},body=""}
|
||||
local socket
|
||||
|
||||
method = string.match(data, "^(%S+)")
|
||||
|
||||
socket, partial = comm.tryssl(host, port, data, { timeout = options.timeout })
|
||||
local socket, partial, opts = comm.tryssl(host, port, data, { timeout = options.timeout })
|
||||
|
||||
if not socket then
|
||||
return error_response
|
||||
@@ -1148,6 +1147,9 @@ local function request(host, port, data, options)
|
||||
|
||||
socket:close()
|
||||
|
||||
-- if SSL was used to retrieve the URL mark this in the response
|
||||
response.ssl = ( opts == 'ssl' )
|
||||
|
||||
return response
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user