mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
New, broader portrule for SSH scripts. Closes #1825
This commit is contained in:
@@ -26,7 +26,7 @@ license = "Same as Nmap--See https://nmap.org/book/man-legal.html"
|
||||
categories = {"auth", "intrusive"}
|
||||
|
||||
local username = stdnse.get_script_args("ssh.user") or rand.random_alpha(5)
|
||||
portrule = shortport.port_or_service(22, 'ssh')
|
||||
portrule = shortport.ssh
|
||||
|
||||
function action (host, port)
|
||||
local result = stdnse.output_table()
|
||||
|
||||
@@ -31,7 +31,7 @@ categories = {
|
||||
'intrusive',
|
||||
}
|
||||
|
||||
portrule = shortport.port_or_service(22, 'ssh')
|
||||
portrule = shortport.ssh
|
||||
|
||||
local arg_timeout = stdnse.get_script_args(SCRIPT_NAME .. ".timeout") or "5s"
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ license = "Same as Nmap--See https://nmap.org/book/man-legal.html"
|
||||
categories = {"safe","default","discovery"}
|
||||
|
||||
|
||||
portrule = shortport.port_or_service(22, "ssh")
|
||||
portrule = shortport.ssh
|
||||
|
||||
postrule = function() return (nmap.registry.sshhostkey ~= nil) end
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ local usernames = stdnse.get_script_args "ssh.usernames"
|
||||
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')
|
||||
portrule = shortport.ssh
|
||||
|
||||
function action (host, port)
|
||||
local result = stdnse.output_table()
|
||||
|
||||
@@ -43,7 +43,7 @@ categories = {
|
||||
'intrusive',
|
||||
}
|
||||
|
||||
portrule = shortport.port_or_service(22, 'ssh')
|
||||
portrule = shortport.ssh
|
||||
|
||||
local username = stdnse.get_script_args 'ssh-run.username'
|
||||
local cmd = stdnse.get_script_args 'ssh-run.cmd'
|
||||
|
||||
@@ -103,7 +103,7 @@ license = "Same as Nmap--See https://nmap.org/book/man-legal.html"
|
||||
categories = {"safe", "discovery"}
|
||||
|
||||
|
||||
portrule = shortport.port_or_service(22, "ssh")
|
||||
portrule = shortport.ssh
|
||||
|
||||
-- Build onto lists{} and possibly modify parsed{} based on whether the
|
||||
-- algorithm name-lists are identical between the server-to-client and
|
||||
|
||||
@@ -19,7 +19,7 @@ categories = {"default", "safe"}
|
||||
-- true
|
||||
|
||||
|
||||
portrule = shortport.port_or_service(22, "ssh")
|
||||
portrule = shortport.ssh
|
||||
|
||||
action = function(host, port)
|
||||
local socket = nmap.new_socket()
|
||||
|
||||
Reference in New Issue
Block a user