1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 22:21:29 +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 comm = require "comm"
local nmap = require "nmap"
local shortport = require "shortport"
@@ -49,8 +48,8 @@ action = function(host, port)
nmap.set_port_state(host, port, "open")
-- parse response for dns flags
if (bit.band(string.byte(result,3), 0x80) == 0x80
and bit.band(string.byte(result,4), 0x85) == 0x80)
if (string.byte(result,3) & 0x80) == 0x80
and (string.byte(result,4) & 0x85) == 0x80
then
return "Recursion appears to be enabled"
end