mirror of
https://github.com/nmap/nmap.git
synced 2025-12-08 21:51:28 +00:00
Enable vulners.nse to work during IPv6 scans
This commit is contained in:
@@ -120,20 +120,18 @@ end
|
|||||||
-- @param type string, the type query argument
|
-- @param type string, the type query argument
|
||||||
--
|
--
|
||||||
function get_results(what, vers, type)
|
function get_results(what, vers, type)
|
||||||
local v_host="vulners.com"
|
local api_endpoint = "https://vulners.com/api/v3/burp/software/"
|
||||||
local v_port=443
|
|
||||||
local response, path
|
|
||||||
local status, error
|
|
||||||
local vulns
|
local vulns
|
||||||
local option={header={}}
|
local option={
|
||||||
|
header={
|
||||||
|
['User-Agent'] = string.format('Vulners NMAP Plugin %s', api_version)
|
||||||
|
},
|
||||||
|
any_af = true,
|
||||||
|
}
|
||||||
|
|
||||||
option['header']['User-Agent'] = string.format('Vulners NMAP Plugin %s', api_version)
|
local response = http.get_url(('%s?software=%s&version=%s&type=%s'):format(api_endpoint, what, vers, type), option)
|
||||||
|
|
||||||
path = '/api/v3/burp/software/' .. '?software=' .. what .. '&version=' .. vers .. '&type=' .. type
|
local status = response.status
|
||||||
|
|
||||||
response = http.get(v_host, v_port, path, option)
|
|
||||||
|
|
||||||
status = response.status
|
|
||||||
if status == nil then
|
if status == nil then
|
||||||
-- Something went really wrong out there
|
-- Something went really wrong out there
|
||||||
-- According to the NSE way we will die silently rather than spam user with error messages
|
-- According to the NSE way we will die silently rather than spam user with error messages
|
||||||
|
|||||||
Reference in New Issue
Block a user