mirror of
https://github.com/nmap/nmap.git
synced 2025-12-10 09:49:05 +00:00
New tableaux library containing table auxiliary functions.
This commit is contained in:
@@ -4,6 +4,7 @@ local shortport = require "shortport"
|
||||
local stdnse = require "stdnse"
|
||||
local string = require "string"
|
||||
local table = require "table"
|
||||
local tableaux = require "table"
|
||||
local rand = require "rand"
|
||||
|
||||
description = [[
|
||||
@@ -80,7 +81,7 @@ local function filter_out(t, filter)
|
||||
local result = {}
|
||||
local _, e, f
|
||||
for _, e in ipairs(t) do
|
||||
if not stdnse.contains(filter, e) then
|
||||
if not tableaux.contains(filter, e) then
|
||||
result[#result + 1] = e
|
||||
end
|
||||
end
|
||||
@@ -159,14 +160,14 @@ action = function(host, port)
|
||||
local status_lines = {}
|
||||
|
||||
for _, method in pairs(SAFE_METHODS) do
|
||||
if not stdnse.contains(methods, method) then
|
||||
if not tableaux.contains(methods, method) then
|
||||
table.insert(to_test, method)
|
||||
end
|
||||
end
|
||||
|
||||
if test_all_unsafe then
|
||||
for _, method in pairs(UNSAFE_METHODS) do
|
||||
if not stdnse.contains(methods, method) then
|
||||
if not tableaux.contains(methods, method) then
|
||||
table.insert(to_test, method)
|
||||
end
|
||||
end
|
||||
@@ -212,7 +213,7 @@ action = function(host, port)
|
||||
if method == "OPTIONS" then
|
||||
-- Use the saved value.
|
||||
str = options_status_line
|
||||
elseif stdnse.contains(to_test, method) then
|
||||
elseif tableaux.contains(to_test, method) then
|
||||
-- use the value saved earlier.
|
||||
str = status_lines[method]
|
||||
-- this case arises when methods in the Public or Allow headers are retested.
|
||||
|
||||
Reference in New Issue
Block a user