1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-19 20:59:01 +00:00

Standardize random string generation on stdnse.generate_random_string

This commit is contained in:
dmiller
2015-02-25 05:06:08 +00:00
parent f6733b2d89
commit db717c7543
10 changed files with 15 additions and 119 deletions

View File

@@ -51,11 +51,7 @@ portrule = shortport.port_or_service({6666,6667,6697,6679},{"irc","ircs"})
local banner_timeout = 60
local function random_nick ()
local t = {}
for i = 1, 9 do -- minimum 9 char nick
t[i] = math.random(97, 122) -- lowercase ascii
end
return ("%c"):rep(#t):format(table.unpack(t))
return stdnse.generate_random_string(9, "abcdefghijklmnopqrstuvwxyz")
end
function action (host, port)