1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Fix some missing requires, globals, whitespace

This commit is contained in:
dmiller
2017-08-12 03:48:09 +00:00
parent 987680e7b6
commit dd97499f04
2 changed files with 31 additions and 30 deletions

View File

@@ -1,3 +1,4 @@
local nmap = require "nmap"
local http = require "http"
local shortport = require "shortport"
local stdnse = require "stdnse"
@@ -50,8 +51,7 @@ local callbacks = {"callback", "cb", "jsonp", "jsonpcallback", "jcb", "call"}
--Checks the body and returns if valid json data is present in callback function
local checkjson = function(body)
local func, json_data
_, _, _, func, json_data = string.find(body, "^(%S-)([%w_]+)%((.*)%);?$")
local _, _, _, func, json_data = string.find(body, "^(%S-)([%w_]+)%((.*)%);?$")
--Check if the json_data is valid
--If valid, we have a JSONP endpoint with func as the function name

View File

@@ -1,5 +1,6 @@
local shortport = require "shortport"
local stdnse = require "stdnse"
local string = require "string"
local http = require "http"
local table = require "table"
local io = require "io"