1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-28 18:39:03 +00:00

Replace instances of bin.pack('A', x), which is equivalent to tostring(x), and a no-op on strings

This commit is contained in:
dmiller
2015-03-03 04:48:18 +00:00
parent 03110e7e89
commit e2bfa97920
6 changed files with 11 additions and 15 deletions

View File

@@ -203,7 +203,7 @@ function encodeLDAPOp( appno, isConstructed, data )
local encoded_str = ""
local asn1_type = asn1.BERtoInt( asn1.BERCLASS.Application, isConstructed, appno )
encoded_str = encode( { _ldaptype = bin.pack("A", string.format("%X", asn1_type)), data } )
encoded_str = encode( { _ldaptype = string.format("%X", asn1_type), data } )
return encoded_str
end
@@ -512,7 +512,7 @@ function createFilter( filter )
filter_str = filter_str .. obj .. val
end
return encode( { _ldaptype=bin.pack("A", string.format("%X", asn1_type)), filter_str } )
return encode( { _ldaptype=string.format("%X", asn1_type), filter_str } )
end
--- Converts a search result as received from searchRequest to a "result" table