fortra / impacket

Impacket is a collection of Python classes for working with network protocols.
https://www.coresecurity.com
Other
12.99k stars 3.5k forks source link

Fix: undo untested breaking changes from #1311 that change getErrorString #1714

Closed Marshall-Hallenbeck closed 3 months ago

Marshall-Hallenbeck commented 3 months ago

1311 was untested and broke how NetExec (previously crackmapexec) handle errors. Ironically, the PR was intended to fix something for CME, but instead it broke how all nt_status errors were handled via getErrorString.

This PR reverts the changes to the getErrorString function, which is required for NetExec to be able to use Fortra's Impacket upstream. We need to use Fortra's Impacket to have NetExec packaged on Kali Linux, so please consider testing and merging this ASAP. Thank you!

gabrielg5 commented 3 months ago

Mistested #1311 and some unwanted changes were merged in master.

getErrorString should continue working as before.

Eventually we may want to check if self.error is in our dictionary to avoid raising an exception and handle that scenario with a custom unknown error message tuple.

@Marshall-Hallenbeck will merge this PR after you fix the suggestion.

thanks!!