mirror of
https://github.com/nmap/nmap.git
synced 2026-08-03 22:29:06 +00:00
nse_check_globals cleanup
This commit is contained in:
parent
37ab88e840
commit
d79e431e7a
2 changed files with 11 additions and 7 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue