mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
nse_check_globals cleanup
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
local bit = require "bit"
|
||||
local stdnse = require "stdnse"
|
||||
local math = require "math"
|
||||
local nmap = require "nmap"
|
||||
local strbuf = require "strbuf"
|
||||
local string = require "string"
|
||||
local table = require "table"
|
||||
local shortport = require "shortport"
|
||||
|
||||
@@ -310,11 +312,11 @@ local dec_data = function(str, len, key)
|
||||
-- skip the header (first 20 bytes)
|
||||
local data = { string.byte(str, 21, 20 + len) }
|
||||
|
||||
a1 = bit.band(key, 0xFF)
|
||||
local a1 = bit.band(key, 0xFF)
|
||||
if a1 == 0 then
|
||||
return table.concat(data)
|
||||
end
|
||||
a2 = bit.rshift(key, 8)
|
||||
local a2 = bit.rshift(key, 8)
|
||||
|
||||
for i = 1,len do
|
||||
data[i] = bit.band(data[i] - (crypt_data[a2 + 1] + ((i - 1) % 72)), 0xFF)
|
||||
|
||||
Reference in New Issue
Block a user