1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-24 16:39:03 +00:00

Cosmetic fixes: indentation and trailing whitespaces.

This commit is contained in:
henri
2012-07-09 16:33:58 +00:00
parent 8a4ebef626
commit 47d8b75fcf

View File

@@ -33,7 +33,7 @@ For more information, see:
--
-- @output
-- Host script results:
-- | firewall-bypass:
-- | firewall-bypass:
-- |_ Firewall vulnerable to bypass through ftp helper. (IPv4)
author = "Hani Benhabiles"
@@ -126,7 +126,7 @@ ftp_helper = {
-- Spoof packet
-- 1. Invert ethernet addresses
f.frame_buf = f.mac_src .. f.mac_dst .. ethertype
-- 2. Modify packet payload
p.buf = string.sub(p.buf, 1, p.tcp_data_offset) .. payload
-- 3. Increment IP ID field (IPv4 packets)
@@ -173,14 +173,15 @@ ftp_helper = {
-- wait packet spoofing thread to finish
stdnse.sleep(1.5)
socket:close()
socket:close()
return
end,
}
-- List of helpers
local helpers = { ftp = ftp_helper, -- FTP (IPv4 and IPv6)
}
local helpers = {
ftp = ftp_helper, -- FTP (IPv4 and IPv6)
}
local helper
@@ -224,7 +225,7 @@ action = function(host, port)
end
testsock:close()
else
-- If not target port specified, we try to get a filtered port,
-- If not target port specified, we try to get a filtered port,
-- which would be more likely blocked by a firewall before looking for a closed one.
local port = nmap.get_ports(host, nil, "tcp", "filtered") or nmap.get_ports(host, nil, "tcp", "closed")
if port then
@@ -238,7 +239,7 @@ action = function(host, port)
end
-- If helper chosen by user
if helper then
if helpers[helper].should_run(host, helperport) then
if helpers[helper].should_run(host, helperport) then
helpers[helper].attack(host, helperport, targetport)
else
return