mirror of
https://github.com/nmap/nmap.git
synced 2026-01-01 20:39:02 +00:00
Convert more bin.lua packings
This commit is contained in:
@@ -17,10 +17,10 @@
|
||||
--@copyright Same as Nmap--See https://nmap.org/book/man-legal.html
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
local bin = require "bin"
|
||||
local msrpc = require "msrpc"
|
||||
local msrpctypes = require "msrpctypes"
|
||||
local stdnse = require "stdnse"
|
||||
local string = require "string"
|
||||
_ENV = stdnse.module("msrpcperformance", stdnse.seeall)
|
||||
|
||||
---Parses the title database, which is a series of null-terminated string pairs.
|
||||
@@ -35,7 +35,7 @@ local function parse_perf_title_database(data, pos)
|
||||
|
||||
repeat
|
||||
local number, name
|
||||
pos, number, name = bin.unpack("<zz", data, pos)
|
||||
number, name, pos = string.unpack("<zz", data, pos)
|
||||
|
||||
if(number == nil) then
|
||||
return false, "Couldn't parse the title database: end of string encountered early"
|
||||
@@ -326,7 +326,6 @@ local function parse_perf_counter(data, pos, counter_definition)
|
||||
pos, result = msrpctypes.unmarshall_int32(data, pos)
|
||||
elseif(counter_definition['CounterSize'] == 8) then
|
||||
pos, result = msrpctypes.unmarshall_int64(data, pos)
|
||||
-- pos, result = bin.unpack("<d", data, pos)
|
||||
else
|
||||
pos, result = msrpctypes.unmarshall_raw(data, pos, counter_definition['CounterSize'])
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user