1
0
mirror of https://github.com/nmap/nmap.git synced 2026-02-01 11:09:07 +00:00

Minor optimizations to stdnse.lua

Fixed stdnse.lua to use a default name for module()
This commit is contained in:
batrick
2008-06-09 02:23:22 +00:00
parent d47e9fd66d
commit 46ce09a994

View File

@@ -1,6 +1,6 @@
-- See nmaps COPYING for licence
module(..., package.seeall)
module(... or "stdnse", package.seeall)
print_debug = function(...)
local verbosity = 1;
@@ -25,9 +25,7 @@ function strsplit(delimiter, text)
local list = {}
local pos = 1
if string.find("", delimiter, 1) then -- this would result in endless loops
error("delimiter matches empty string!")
end
assert(delimiter ~= "", "delimiter matches empty string!");
while true do
local first, last = string.find(text, delimiter, pos)