From 2a185e31c8563b1702d977ea12b6c192e82e82bb Mon Sep 17 00:00:00 2001 From: thejosko Date: Thu, 9 Mar 2017 14:54:01 -0600 Subject: [PATCH] RunFinger.py max length fix --- tools/RunFinger.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/RunFinger.py b/tools/RunFinger.py index 19f69a7..3de6d72 100755 --- a/tools/RunFinger.py +++ b/tools/RunFinger.py @@ -167,6 +167,11 @@ def GetHostnameAndDomainName(data): try: DomainJoined, Hostname = tuple([e.replace('\x00','') for e in data[81:].split('\x00\x00\x00')[:2]]) Time = GetBootTime(data[60:68]) + #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, Time except: return "Could not get Hostname.", "Could not get Domain joined"