SMBFinger/Finger also exhibits the same issue

This commit is contained in:
thejosko 2017-03-10 09:55:41 -06:00
commit 66eace9853

View file

@ -148,6 +148,11 @@ def OsNameClientVersion(data):
def GetHostnameAndDomainName(data):
try:
DomainJoined, Hostname = tuple([e.replace('\x00','') for e in data[81:].split('\x00\x00\x00')[:2]])
#If max length domain name, there won't be a \x00\x00\x00 delineator to split on
if Hostname == '':
DomainJoined = data[81:110].replace('\x00','')
Hostname = data[113:].replace('\x00','')
return Hostname, DomainJoined
except:
return "Could not get Hostname.", "Could not get Domain joined"