1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Move arshift from bit.lua to bits.lua

This commit is contained in:
dmiller
2018-08-28 15:56:46 +00:00
parent 24c5ff63b2
commit 7e5ef7130b
4 changed files with 19 additions and 20 deletions

View File

@@ -1,4 +1,4 @@
local bit = require "bit"
local bits = require "bits"
local bin = require "bin"
local brute = require "brute"
local creds = require "creds"
@@ -198,7 +198,7 @@ local backorifice =
--calculate next seed
seed = self:gen_next_seed(seed)
--calculate encryption key based on seed
local key = bit.arshift(seed,16) & 0xff
local key = bits.arshift(seed,16) & 0xff
crypto_byte = data_byte ~ key
output = bin.pack("AC",output,crypto_byte)

View File

@@ -1,4 +1,4 @@
local bit = require "bit"
local bits = require "bits"
local bin = require "bin"
local nmap = require "nmap"
local shortport = require "shortport"
@@ -202,7 +202,7 @@ local function BOcrypt(data, password, initial_seed )
--calculate next seed
seed = gen_next_seed(seed)
--calculate encryption key based on seed
local key = bit.arshift(seed,16) & 0xff
local key = bits.arshift(seed,16) & 0xff
crypto_byte = data_byte ~ key
output = bin.pack("AC",output,crypto_byte)