mirror of
https://github.com/nmap/nmap.git
synced 2026-01-06 14:39:03 +00:00
Added code to brute library that picks up the executing SCRIPT_NAME using getfenv [Patrik]
This commit is contained in:
@@ -623,7 +623,10 @@ Engine =
|
||||
|
||||
local cvar = {}
|
||||
local condvar = nmap.condvar( cvar )
|
||||
local script_env = getfenv(2)
|
||||
|
||||
-- get the SCRIPT_NAME of the executing script
|
||||
self.options.script_name = self.options.script_name or script_env.SCRIPT_NAME
|
||||
assert(self.options.script_name, "SCRIPT_NAME was not set in options.script_name")
|
||||
assert(self.port.number and self.port.protocol, "Invalid port table detected")
|
||||
self.port.service = self.port.service or "unknown"
|
||||
|
||||
Reference in New Issue
Block a user