mirror of
https://github.com/nmap/nmap.git
synced 2025-12-24 08:29:04 +00:00
Added error handling to catch and gracefully handle error when script was called via category instead of explicitly. The error was due to the backorifice-brute.ports script arg not being specified and the script trying to concat the value (nil).
This commit is contained in:
@@ -20,7 +20,7 @@ the script against).
|
||||
-- 31337/udp open BackOrifice
|
||||
-- | backorifice-brute:
|
||||
-- | Accounts:
|
||||
-- | michael => Login correct
|
||||
-- | michael => Valid credentials
|
||||
-- | Statistics
|
||||
-- |_ Perfomed 60023 guesses in 467 seconds, average tps: 138
|
||||
--
|
||||
@@ -47,7 +47,13 @@ require("creds")
|
||||
-- This portrule succeeds only when the open|filtered port is in the port range
|
||||
-- which is specified by the ports script argument
|
||||
portrule = function(host, port)
|
||||
if not stdnse.get_script_args(SCRIPT_NAME .. ".ports") then
|
||||
stdnse.print_debug(3,"Skipping '%s' %s, 'ports' argument is missing.",SCRIPT_NAME, SCRIPT_TYPE)
|
||||
return false
|
||||
end
|
||||
|
||||
local ports = stdnse.get_script_args(SCRIPT_NAME .. ".ports")
|
||||
|
||||
--print out a debug message if port 31337/udp is open
|
||||
if port.number==31337 and port.protocol == "udp" and not(ports) then
|
||||
stdnse.print_debug("Port 31337/udp is open. Possibility of version detection and password bruteforcing using the backorifice-brute script")
|
||||
|
||||
Reference in New Issue
Block a user