mirror of
https://github.com/nmap/nmap.git
synced 2026-01-01 12:29:03 +00:00
Move stdnse.generate_random_string to new rand.lua
This commit is contained in:
@@ -4,6 +4,7 @@ local creds = require "creds"
|
||||
local match = require "match"
|
||||
local irc = require "irc"
|
||||
local stdnse = require "stdnse"
|
||||
local rand = require "rand"
|
||||
|
||||
description=[[
|
||||
Performs brute force password auditing against IRC (Internet Relay Chat) servers.
|
||||
@@ -87,12 +88,8 @@ Driver = {
|
||||
disconnect = function(self) return self.socket:close() end,
|
||||
}
|
||||
|
||||
local function random_nick()
|
||||
return stdnse.generate_random_string(9, "abcdefghijklmnopqrstuvwxyz")
|
||||
end
|
||||
|
||||
local function needsPassword(host, port)
|
||||
local msg = ("NICK %s\r\nUSER anonymous 0 * :Nmap brute\r\n"):format(random_nick())
|
||||
local msg = ("NICK %s\r\nUSER anonymous 0 * :Nmap brute\r\n"):format(rand.random_alpha(9))
|
||||
local s, r, opts, _ = comm.tryssl(host, port, msg, { timeout = 15000 } )
|
||||
local err, code
|
||||
|
||||
|
||||
Reference in New Issue
Block a user