From 30de1639eb9b4e3e4d08626cffd09267fb3bfd1d Mon Sep 17 00:00:00 2001 From: dmiller Date: Mon, 11 Sep 2017 15:17:51 +0000 Subject: [PATCH] Fix some arg handling for ssh-publickey-acceptance --- nselib/libssh2-utility.lua | 4 ++-- scripts/http-jsonp-detection.nse | 0 scripts/smb-enum-services.nse | 0 scripts/ssh-publickey-acceptance.nse | 4 ++-- 4 files changed, 4 insertions(+), 4 deletions(-) mode change 100755 => 100644 scripts/http-jsonp-detection.nse mode change 100755 => 100644 scripts/smb-enum-services.nse diff --git a/nselib/libssh2-utility.lua b/nselib/libssh2-utility.lua index f61576b04..2176564eb 100644 --- a/nselib/libssh2-utility.lua +++ b/nselib/libssh2-utility.lua @@ -152,14 +152,14 @@ end -- -- @param publickey An SSH public key file. -- @return true on success or false on error. --- @return publick key data on success or error code on error. +-- @return public key data on success or error code on error. function SSHConnection:read_publickey (publickey) local status, result = pcall(libssh2.read_publickey, publickey) return status, result end --- --- Attempts authentication with publick key +-- Attempts authentication with public key -- -- @param username A username to authenticate as. -- @param key Base64 decrypted public key. diff --git a/scripts/http-jsonp-detection.nse b/scripts/http-jsonp-detection.nse old mode 100755 new mode 100644 diff --git a/scripts/smb-enum-services.nse b/scripts/smb-enum-services.nse old mode 100755 new mode 100644 diff --git a/scripts/ssh-publickey-acceptance.nse b/scripts/ssh-publickey-acceptance.nse index 7d0fbcf60..6c985e9c7 100644 --- a/scripts/ssh-publickey-acceptance.nse +++ b/scripts/ssh-publickey-acceptance.nse @@ -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