Clean authentication fail message on winrm protocol when ntlm error

main
mpgn 2020-06-20 06:26:32 -04:00
parent b8c505c234
commit c590230f97
1 changed files with 9 additions and 4 deletions

View File

@ -148,10 +148,15 @@ class winrm(connection):
return True
except Exception as e:
self.logger.error(u'{}\\{}:{} "{}"'.format(self.domain,
username,
password,
e))
if "with ntlm" in str(e):
self.logger.error(u'{}\\{}:{}'.format(self.domain,
username,
password))
else:
self.logger.error(u'{}\\{}:{} "{}"'.format(self.domain,
username,
password,
e))
return False