1
0
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:
patrik
2012-06-06 22:04:28 +00:00
parent c4617f8d31
commit 721ac80024
7 changed files with 19 additions and 85 deletions

View File

@@ -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)