mirror of
https://github.com/nmap/nmap.git
synced 2025-12-28 18:39:03 +00:00
Remove trailing whitespace in lua files
Whitespace is not significant, so this should not be a problem. https://secwiki.org/w/Nmap/Code_Standards
This commit is contained in:
@@ -18,7 +18,7 @@ prior to requesting authentication.
|
||||
-- @output
|
||||
-- PORT STATE SERVICE
|
||||
-- 3031/tcp open eppc
|
||||
-- | eppc-enum-processes:
|
||||
-- | eppc-enum-processes:
|
||||
-- | application uid pid
|
||||
-- | Address Book 501 269
|
||||
-- | Facetime 501 495
|
||||
@@ -39,27 +39,27 @@ categories = {"discovery", "safe"}
|
||||
portrule = shortport.port_or_service(3031, "eppc", "tcp", "open")
|
||||
|
||||
action = function( host, port )
|
||||
|
||||
|
||||
local socket = nmap.new_socket()
|
||||
socket:set_timeout(5000)
|
||||
|
||||
local try = nmap.new_try(
|
||||
function()
|
||||
|
||||
local try = nmap.new_try(
|
||||
function()
|
||||
stdnse.print_debug("%s: failed", SCRIPT_NAME)
|
||||
socket:close()
|
||||
end
|
||||
)
|
||||
|
||||
|
||||
-- a list of application that may or may not be running on the target
|
||||
local apps = {
|
||||
"Address Book",
|
||||
"App Store",
|
||||
"Facetime",
|
||||
"Finder",
|
||||
"Firefox",
|
||||
"Finder",
|
||||
"Firefox",
|
||||
"Google Chrome",
|
||||
"iChat",
|
||||
"iPhoto",
|
||||
"iPhoto",
|
||||
"Keychain Access",
|
||||
"iTunes",
|
||||
"Photo booth",
|
||||
@@ -68,12 +68,12 @@ action = function( host, port )
|
||||
"Safari",
|
||||
"Spotify",
|
||||
"Terminal",
|
||||
"TextMate",
|
||||
"TextMate",
|
||||
"Transmission",
|
||||
"VLC",
|
||||
"VLC media player",
|
||||
}
|
||||
|
||||
|
||||
local results = tab.new(3)
|
||||
tab.addrow( results, "application", "uid", "pid" )
|
||||
|
||||
@@ -81,10 +81,10 @@ action = function( host, port )
|
||||
try( socket:connect(host, port, "tcp") )
|
||||
local data
|
||||
|
||||
local packets = {
|
||||
local packets = {
|
||||
"PPCT\0\0\0\1\0\0\0\1",
|
||||
-- unfortunately I've found no packet specifications, so this has to do
|
||||
bin.pack("HCpH", "e44c50525401e101", 225 + #app, app, "dfdbe302013ddfdfdfdfd500")
|
||||
bin.pack("HCpH", "e44c50525401e101", 225 + #app, app, "dfdbe302013ddfdfdfdfd500")
|
||||
}
|
||||
|
||||
for _, v in ipairs(packets) do
|
||||
@@ -97,7 +97,7 @@ action = function( host, port )
|
||||
|
||||
try( socket:close() )
|
||||
end
|
||||
|
||||
|
||||
return "\n" .. tab.dump(results)
|
||||
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user