mirror of
https://github.com/nmap/nmap.git
synced 2025-12-15 20:29:03 +00:00
reverted previous commit, due to unfinnished changes in smb, asn1 and smbauth
libraries.
This commit is contained in:
@@ -277,12 +277,11 @@ ASN1Decoder = {
|
||||
--
|
||||
ASN1Encoder = {
|
||||
|
||||
new = function(self)
|
||||
local o = {}
|
||||
setmetatable(o, self)
|
||||
self.__index = self
|
||||
o:registerBaseEncoders()
|
||||
return o
|
||||
new = function(self,o)
|
||||
o = o or {}
|
||||
setmetatable(o, self)
|
||||
self.__index = self
|
||||
return o
|
||||
end,
|
||||
|
||||
---
|
||||
@@ -333,14 +332,6 @@ ASN1Encoder = {
|
||||
end
|
||||
end
|
||||
|
||||
-- Table encoder
|
||||
self.encoder['table'] = function( self, val )
|
||||
assert('table' == type(val), "val is not a table")
|
||||
assert(#val.type > 0, "Table is missing the type field")
|
||||
assert(val.value ~= nil, "Table is missing the value field")
|
||||
return bin.pack("HAA", val.type, self.encodeLength(#val.value), val.value)
|
||||
end
|
||||
|
||||
-- Integer encoder
|
||||
self.encoder['number'] = function( self, val )
|
||||
local ival = self.encodeInt(val)
|
||||
|
||||
Reference in New Issue
Block a user