1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-30 18:19:05 +00:00

Re-indent some scripts. Whitespace-only commit

https://secwiki.org/w/Nmap/Code_Standards
This commit is contained in:
dmiller
2014-01-31 13:02:29 +00:00
parent 64fb5b3482
commit d36c08dcf5
137 changed files with 3977 additions and 3977 deletions

View File

@@ -31,24 +31,24 @@ categories = {"default", "safe", "discovery"}
portrule = shortport.port_or_service(5060, "sip", {"tcp", "udp"})
action = function(host, port)
local status, session, response
session = sip.Session:new(host, port)
status = session:connect()
if not status then
return "ERROR: Failed to connect to the SIP server."
local status, session, response
session = sip.Session:new(host, port)
status = session:connect()
if not status then
return "ERROR: Failed to connect to the SIP server."
end
status, response = session:options()
if status then
-- If port state not set to open, set it to open.
if nmap.get_port_state(host, port) ~= "open" then
nmap.set_port_state(host, port, "open")
end
status, response = session:options()
if status then
-- If port state not set to open, set it to open.
if nmap.get_port_state(host, port) ~= "open" then
nmap.set_port_state(host, port, "open")
end
-- Check if allow header exists in response
local allow = response:getHeader("allow")
if allow then
return stdnse.format_output(true, allow)
end
-- Check if allow header exists in response
local allow = response:getHeader("allow")
if allow then
return stdnse.format_output(true, allow)
end
end
end