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

Move string utility functions to stringaux.lua

This commit is contained in:
dmiller
2018-10-18 01:08:19 +00:00
parent 39cfbdf4e2
commit 0500811f5a
140 changed files with 521 additions and 418 deletions

View File

@@ -2,6 +2,7 @@ local nmap = require "nmap"
local shortport = require "shortport"
local stdnse = require "stdnse"
local string = require "string"
local stringaux = require "stringaux"
local table = require "table"
description = [[
@@ -70,7 +71,7 @@ action = function( host, port )
while line ~= nil do
if #line > 1 then
local gtype = string.sub(line, 1, 1)
local fields = stdnse.strsplit("\t", string.sub(line, 2))
local fields = stringaux.strsplit("\t", string.sub(line, 2))
if #fields > 1 then
local label = fields[1]
local filename = fields[2]
@@ -86,6 +87,6 @@ action = function( host, port )
end
line = buffer()
end
return "\n" .. stdnse.strjoin("\n", files)
return "\n" .. table.concat(files, "\n")
end