1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-26 09:29:01 +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:
dmiller
2014-01-23 21:51:58 +00:00
parent 86ac3c0a19
commit 620f9fdb34
499 changed files with 11134 additions and 11134 deletions

View File

@@ -10,7 +10,7 @@ Attempts to enumerate Windows user accounts through SNMP
---
-- @output
-- | snmp-win32-users:
-- | snmp-win32-users:
-- | Administrator
-- | Guest
-- | IUSR_EDUSRV011
@@ -46,38 +46,38 @@ function process_answer( tbl )
for _, v in ipairs( tbl ) do
table.insert( new_tab, v.value )
end
table.sort( new_tab )
return new_tab
end
action = function(host, port)
local socket = nmap.new_socket()
local catch = function() socket:close() end
local try = nmap.new_try(catch)
local try = nmap.new_try(catch)
local snmpoid = "1.3.6.1.4.1.77.1.2.25"
local users = {}
local status
socket:set_timeout(5000)
try(socket:connect(host, port))
status, users = snmp.snmpWalk( socket, snmpoid )
socket:close()
if( not(status) ) then
return
end
users = process_answer( users )
if ( users == nil ) or ( #users == 0 ) then
return
end
nmap.set_port_state(host, port, "open")
return stdnse.format_output( true, users )