mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 13:11:28 +00:00
Fix some missing requires, globals, whitespace
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
local nmap = require "nmap"
|
||||||
local http = require "http"
|
local http = require "http"
|
||||||
local shortport = require "shortport"
|
local shortport = require "shortport"
|
||||||
local stdnse = require "stdnse"
|
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
|
--Checks the body and returns if valid json data is present in callback function
|
||||||
local checkjson = function(body)
|
local checkjson = function(body)
|
||||||
|
|
||||||
local func, json_data
|
local _, _, _, func, json_data = string.find(body, "^(%S-)([%w_]+)%((.*)%);?$")
|
||||||
_, _, _, func, json_data = string.find(body, "^(%S-)([%w_]+)%((.*)%);?$")
|
|
||||||
|
|
||||||
--Check if the json_data is valid
|
--Check if the json_data is valid
|
||||||
--If valid, we have a JSONP endpoint with func as the function name
|
--If valid, we have a JSONP endpoint with func as the function name
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
local shortport = require "shortport"
|
local shortport = require "shortport"
|
||||||
local stdnse = require "stdnse"
|
local stdnse = require "stdnse"
|
||||||
|
local string = require "string"
|
||||||
local http = require "http"
|
local http = require "http"
|
||||||
local table = require "table"
|
local table = require "table"
|
||||||
local io = require "io"
|
local io = require "io"
|
||||||
|
|||||||
Reference in New Issue
Block a user