Land #7435, NTLM Util change to support Unicode hostnames
commit
a2fe934c15
|
@ -397,16 +397,21 @@ class Utils
|
||||||
case atype
|
case atype
|
||||||
when 1
|
when 1
|
||||||
#netbios name
|
#netbios name
|
||||||
data[:default_name] = addr.gsub("\x00", '')
|
temp_name = addr
|
||||||
|
temp_name.force_encoding("UTF-16LE")
|
||||||
|
data[:default_name] = temp_name.encode("UTF-8")
|
||||||
when 2
|
when 2
|
||||||
#netbios domain
|
#netbios domain
|
||||||
data[:default_domain] = addr.gsub("\x00", '')
|
data[:default_domain] = addr
|
||||||
|
data[:default_domain].force_encoding("UTF-16LE")
|
||||||
when 3
|
when 3
|
||||||
#dns name
|
#dns name
|
||||||
data[:dns_host_name] = addr.gsub("\x00", '')
|
data[:dns_host_name] = addr
|
||||||
|
data[:dns_host_name].force_encoding("UTF-16LE")
|
||||||
when 4
|
when 4
|
||||||
#dns domain
|
#dns domain
|
||||||
data[:dns_domain_name] = addr.gsub("\x00", '')
|
data[:dns_domain_name] = addr
|
||||||
|
data[:dns_domain_name].force_encoding("UTF-16LE")
|
||||||
when 5
|
when 5
|
||||||
#The FQDN of the forest.
|
#The FQDN of the forest.
|
||||||
when 6
|
when 6
|
||||||
|
|
Loading…
Reference in New Issue