mirror of
https://github.com/nmap/nmap.git
synced 2025-12-20 22:49:01 +00:00
Replace host.ip, port.number with host, port
In most cases (e.g. any of the nmap.socket operations), functions can take full host and port tables instead of just host.ip and port.number. This makes for cleaner-looking code and easier extensibility if we decide to check for a protocol on both TCP and UDP, for instance.
This commit is contained in:
@@ -42,8 +42,8 @@ portrule = shortport.portnumber({8080,80,443}, "tcp")
|
||||
|
||||
--- Verifies if the credentials (username, password and domain) are valid
|
||||
--
|
||||
-- @param host string, the ip against which to perform
|
||||
-- @param port number, the port number of the XML service
|
||||
-- @param host string or host table against which to perform
|
||||
-- @param port number or port table of the XML service
|
||||
-- @param username string, the username to authenticate as
|
||||
-- @param password string, the password to authenticate with
|
||||
-- @param domain string, the Windows domain to authenticate against
|
||||
@@ -139,7 +139,7 @@ action = function(host, port)
|
||||
-- iterate over passwordlist
|
||||
while password do
|
||||
local result = "Trying " .. username .. "/" .. password .. " "
|
||||
local account = verify_password(host.ip, port.number, username, password, ntdomain)
|
||||
local account = verify_password(host, port, username, password, ntdomain)
|
||||
|
||||
if account.valid then
|
||||
|
||||
|
||||
Reference in New Issue
Block a user