1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-25 17:09:02 +00:00

Update default-category scripts to use bitwise operators instead of bit.lua

This commit is contained in:
dmiller
2017-03-13 14:58:56 +00:00
parent 090b522c06
commit 3e3f600b8a
10 changed files with 80 additions and 91 deletions

View File

@@ -1,4 +1,3 @@
local bit = require "bit"
local mysql = require "mysql"
local nmap = require "nmap"
local stdnse = require "stdnse"
@@ -53,7 +52,7 @@ local bitset = function(num, lookup)
local caps = {}
for k, v in pairs(lookup) do
if bit.band(num, v) > 0 then
if num & v > 0 then
caps[#caps+1] = k
end
end