fortra / impacket

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

bug fix issue #1675 #1680

Closed NtAlexio2 closed 5 months ago

NtAlexio2 commented 8 months ago

This PR fixes issue reported on #1675. The patch decodes bytes returned from getData() by default sys.stdout encoding. The root cause of the bug is drop Python2 supporting.

alexisbalbachan commented 7 months ago

Hi, the proposed solution will break on certain scenarios:

I think that a better approach would be to represent that buffer in an encoding agnostic way, maybe by using binascii.hexlify(self.getData())

NtAlexio2 commented 7 months ago

Thanks for your review. I applied your suggestion. Please recheck <3