mirror of
https://github.com/nmap/nmap.git
synced 2026-09-19 02:56:00 +00:00
parent
b507356091
commit
f1325d7c6f
5 changed files with 22 additions and 15 deletions
|
|
@ -41,8 +41,9 @@ portrule = shortport.ssh
|
|||
function action (host, port)
|
||||
local result = stdnse.output_table()
|
||||
local helper = libssh2_util.SSHConnection:new()
|
||||
if not helper:connect(host, port) then
|
||||
return "Failed to connect to ssh server"
|
||||
local status, err = helper:connect_pcall(host, port)
|
||||
if not status then
|
||||
return "Failed to connect to ssh server: " .. err
|
||||
end
|
||||
|
||||
local authmethods = helper:list(username)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue