mirror of
https://github.com/nmap/nmap.git
synced 2026-08-03 22:29:06 +00:00
Make the code that manipulates the filename local to a function in banner.nse.
--script-updatedb didn't work because scripts don't have the filename variable in their environment during that.
This commit is contained in:
parent
100aa9d122
commit
8247257ad0
1 changed files with 2 additions and 3 deletions
|
|
@ -40,9 +40,6 @@ action = function( host, port )
|
|||
end
|
||||
|
||||
|
||||
-- convert filename from full filepath to filename -extn
|
||||
local filename = filename:match( "[\\/]([^\\/]+)\.nse$" )
|
||||
|
||||
|
||||
---
|
||||
-- Connects to the target on the given port and returns any data issued by a listening service.
|
||||
|
|
@ -101,6 +98,8 @@ function output( out )
|
|||
|
||||
if type(out) ~= "string" or out == "" then return nil end
|
||||
|
||||
-- convert filename from full filepath to filename -extn
|
||||
local filename = filename:match( "[\\/]([^\\/]+)\.nse$" )
|
||||
local line_len = 75 -- The character width of command/shell prompt window.
|
||||
local fline_offset = 5 -- number of chars excluding script id not available to the script on the first line
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue