Replacing characters when they cannot be converted (UTF-8)

main
Martin Dubé 2017-06-13 14:59:18 -04:00
parent c9eec77cf8
commit 5eb275b55e
1 changed files with 2 additions and 2 deletions

View File

@ -423,7 +423,7 @@ class smb(connection):
if hasattr(self, 'server'): self.server.track_host(self.host)
output = u'{}'.format(exec_method.execute(payload, get_output).strip().decode('utf-8'))
output = u'{}'.format(exec_method.execute(payload, get_output).strip().decode('utf-8',errors='replace'))
if self.args.execute or self.args.ps_execute:
self.logger.success('Executed command {}'.format('via {}'.format(self.args.exec_method) if self.args.exec_method else ''))