mirror of
https://github.com/nmap/nmap.git
synced 2025-12-24 00:19:01 +00:00
Remove bin.lua calls from some scripts and libraries
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
local datetime = require "datetime"
|
||||
local bin = require "bin"
|
||||
local nmap = require "nmap"
|
||||
local shortport = require "shortport"
|
||||
local snmp = require "snmp"
|
||||
local stdnse = require "stdnse"
|
||||
local string = require "string"
|
||||
local table = require "table"
|
||||
|
||||
description = [[
|
||||
@@ -83,12 +83,12 @@ local function get_value_from_table( tbl, oid )
|
||||
end
|
||||
|
||||
local date_xlate = {
|
||||
year = 2,
|
||||
month = 3,
|
||||
day = 4,
|
||||
hour = 5,
|
||||
min = 6,
|
||||
sec = 7
|
||||
year = 1,
|
||||
month = 2,
|
||||
day = 3,
|
||||
hour = 4,
|
||||
min = 5,
|
||||
sec = 6
|
||||
}
|
||||
|
||||
-- translate date parts to positional indices for datetime.format_timestamp
|
||||
@@ -119,7 +119,7 @@ local function process_answer( tbl )
|
||||
if ( v.oid:match(sw_name) ) then
|
||||
local objid = v.oid:gsub(sw_name, sw_date)
|
||||
local install_date = get_value_from_table( tbl, objid )
|
||||
local install_date_tab = { bin.unpack( ">SCCCCC", install_date ) }
|
||||
local install_date_tab = { string.unpack( ">I2 BBBBB", install_date ) }
|
||||
setmetatable(install_date_tab, date_metatab)
|
||||
|
||||
local sw_item = {
|
||||
|
||||
Reference in New Issue
Block a user