1
0
mirror of https://github.com/nmap/nmap.git synced 2026-02-08 06:26:33 +00:00

Remove nearly all bit.lua use

This commit is contained in:
dmiller
2018-08-28 15:56:45 +00:00
parent e0af0179eb
commit 24c5ff63b2
21 changed files with 79 additions and 98 deletions

View File

@@ -1,4 +1,3 @@
local bit = require "bit"
local msrpc = require "msrpc"
local smb = require "smb"
local stdnse = require "stdnse"
@@ -203,7 +202,7 @@ action = function(host, port)
local results, output = {}, {}
for k, _ in pairs(ServerTypes) do
for _, server in ipairs(entries) do
if ( TypeNames[k] and bit.band(server.type,ServerTypes[k]) == ServerTypes[k] ) then
if ( TypeNames[k] and (server.type & ServerTypes[k]) == ServerTypes[k] ) then
results[TypeNames[k].long] = results[TypeNames[k].long] or {}
if ( format == OutputFormat.BY_TYPE_V_DETAILED ) then
table.insert(results[TypeNames[k].long], server)