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:
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user