1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-01 04:19:02 +00:00

Remove nearly all bit.lua use

This commit is contained in:
dmiller
2018-08-28 15:56:45 +00:00
parent e0af0179eb
commit 24c5ff63b2
21 changed files with 79 additions and 98 deletions

View File

@@ -1,6 +1,5 @@
local nmap = require "nmap"
local stdnse = require "stdnse"
local bit = require "bit"
local string = require "string"
local packet = require "packet"
@@ -75,8 +74,8 @@ ftp_helper = {
-- IPv4 payload
payload = "227 Entering Passive Mode (" ..
string.gsub(host.ip,"%.",",") .. "," ..
bit.band(bit.rshift(targetport, 8), 0xff) ..
"," .. bit.band(targetport, 0xff) ..
((targetport >> 8) & 0xff) ..
"," .. (targetport & 0xff) ..
")\r\n"
ethertype = "\x08\0" -- Ethernet Type: IPv4