byt3bl33d3r / CrackMapExec

A swiss army knife for pentesting networks
BSD 2-Clause "Simplified" License
8.37k stars 1.64k forks source link

CrackMapExec does not handle non-ascii characters properly #562

Closed executionByFork closed 2 years ago

executionByFork commented 2 years ago

Describe the bug crackmapexec smb with the --gen-relay-list flag crashes against a host with non-ascii characters in the name

To Reproduce Steps to reproduce the behavior:

  1. Start up a Responder instance
  2. crackmapexec smb <ResponderIP> --gen-relay-list smb_relay_list
  3. Scream at the horrific sight of an uncaught stacktrace cme_nonascii_error

Expected behavior crackmapexec should not stacktrace. It prevents writing to the relay list file.

Crackmapexec info

Additional context This seems to be the same issue as #449 and #439 just in another part of the code. Considering the aforementioned issues have been patched and resolved, this probably a wider spread issue that may exist in other parts of the tool as well.

mpgn commented 2 years ago

Fixed by #560