1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-31 11:59:03 +00:00

Fix some arg handling for ssh-publickey-acceptance

This commit is contained in:
dmiller
2017-09-11 15:17:51 +00:00
parent e8b73078fd
commit 30de1639eb
4 changed files with 4 additions and 4 deletions

View File

@@ -43,7 +43,7 @@ categories = {"auth", "intrusive"}
local privatekeys = stdnse.get_script_args "ssh.privatekeys"
local passphrases = stdnse.get_script_args "ssh.passphrases" or {}
local usernames = stdnse.get_script_args "ssh.usernames"
local knownbad = stdnse.get_script_args "known-bad"
local knownbad = stdnse.get_script_args "knownbad"
local publickeys = stdnse.get_script_args "ssh.publickeys"
local publickeydb = stdnse.get_script_args "publickeydb" or nmap.fetchfile("nselib/data/publickeydb")
portrule = shortport.port_or_service(22, 'ssh')
@@ -70,7 +70,7 @@ function action (host, port)
end
end
if knownbad or not (privatekeys and publickeys) then
if knownbad or not (privatekeys or publickeys) then
for line in io.lines(publickeydb) do
local sections = {}
for section in string.gmatch(line, '([^,]+)') do