mirror of
https://github.com/nmap/nmap.git
synced 2026-10-09 05:44:36 +00:00
Changed command line processing to assume cred mode if credfile was supplied
and no mode was explicitly given [Patrik]
This commit is contained in:
parent
307cc527d7
commit
6c864bd9f8
1 changed files with 9 additions and 0 deletions
|
|
@ -621,6 +621,15 @@ Engine =
|
|||
|
||||
local mode = self.options.mode or stdnse.get_script_args("brute.mode")
|
||||
|
||||
-- if no mode was given, but a credfile is present, assume creds mode
|
||||
if ( not(mode) and stdnse.get_script_args("brute.credfile") ) then
|
||||
if ( stdnse.get_script_args("userdb") or
|
||||
stdnse.get_script_args("passdb") ) then
|
||||
return false, "\n ERROR: brute.credfile can't be used in combination with userdb/passdb"
|
||||
end
|
||||
mode = 'creds'
|
||||
end
|
||||
|
||||
-- Are we guessing against a service that has no username (eg. VNC)
|
||||
if ( self.options.passonly ) then
|
||||
local function single_user_iter(next)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue