Closed brian-foley closed 1 year ago
Thanks for reporting it. Can you try the following patch and confirm it fixes the issue?
base64.b64encode(snippet.encode() if isinstance(snippet, str) else snippet)
This patch fixes the issue. Thanks for the timely response!
https://github.com/buffer/thug/blob/f70114c5b4933e72650b7fb197f18b76b72a835e/thug/Logging/modules/MongoDB.py#L467
Received error message "TypeError: a bytes-like object is required, not 'str'" while running thug on webserver running GlobalLink 2.7.0.8 - ConnectAndEnterRoom ActiveX Control Stack Buffer Overflow exploit. Error is seen here:
I changed the code to: base64.b64encode(snippet.encode("ascii")).decode("ascii") and it seems to resolve the error. I'm not sure if this will break any other functionality.