Skip to content

Commit

Permalink
Api version 0.3
Browse files Browse the repository at this point in the history
Remove double quotes around version for all requests as the correspondent misbehaviour seems to have been fixed on the server side.
  • Loading branch information
Ilya Govorkov committed Dec 26, 2017
1 parent c3476ba commit 69cbfb5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions vulners.nse
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Its work is pretty simple:
-- |_ CVE-2016-0778 https://vulners.com/cve/CVE-2016-0778
--

author = 'gmedian at somewhere else'
author = 'gmedian AT vulners DOT com'
license = "Same as Nmap--See https://nmap.org/book/man-legal.html"
categories = {"vuln", "safe"}

Expand All @@ -32,7 +32,7 @@ local http = require "http"
local json = require "json"
local string = require "string"

local api_version="0.2"
local api_version="0.3"


portrule = function(host, port)
Expand Down Expand Up @@ -72,8 +72,7 @@ function get_results(what, vers, type)

option['header']['User-Agent'] = string.format('Vulners NMAP Plugin %s', api_version)

-- NOTE[gmedian]: add quotes to version so that it is always a string for the backend
path = '/api/v3/burp/software/' .. '?software=' .. what .. '&version="' .. vers .. '"&type=' .. type
path = '/api/v3/burp/software/' .. '?software=' .. what .. '&version=' .. vers .. '&type=' .. type

response = http.get(v_host, v_port, path, option)
status, vulns = json.parse(response.body)
Expand Down

0 comments on commit 69cbfb5

Please sign in to comment.