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

Fixed a bug, reported by Toni Ruottu, for retrieving command line credentials

for services detected by port and where the service was not identified.
[Patrik]
This commit is contained in:
patrik
2011-07-06 13:11:59 +00:00
parent 3a3ae7ede1
commit 7059623d3a

View File

@@ -221,9 +221,13 @@ Credentials = {
if ( state and State.PARAM == bit.band(state, State.PARAM) ) then
local creds_global = stdnse.get_script_args('creds.global')
local creds_service= stdnse.get_script_args('creds.' .. self.service )
local creds_service
local creds_params
if ( self.service ) then
creds_service = stdnse.get_script_args('creds.' .. self.service )
end
if ( creds_service ) then creds_params = creds_service end
if ( creds_global and creds_service ) then
creds_params = creds_params .. ',' .. creds_global