You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A crackmapexec run across a network segment crashed with the error message "TypeError: argument should be integer or bytes-like object, not 'str'".
It seems that get_server_lanman returns a bytes object. I worked around this crash by modifying the two arguments to the find function to bytes objects as well (b'Windows 2000'' and b'Samba').
Due to lack of code knowledge, I do not know if this is the correct fix and therefore did not directly propose a pull request.
Edit: The issue seems to be more complex. The same code line now crashed on another network segment with the error "TypeError: must be str, not bytes". Apparently, get_server_lanman can return both bytes and str.
The text was updated successfully, but these errors were encountered:
* Fixed unicode shares not being found
* Fixed unicode SPNs not being decoded appropriately
* Fixed spn not being found in getST, fixesfortra#1595
* Fixed unicode issues on login when using ntlmV1 fallback
Fixesfortra#1419
During a recent pentest I ran into an issue with the following code line:
https://github.com/SecureAuthCorp/impacket/blob/3c6713e309cae871d685fa443d3e21b7026a2155/impacket/smb.py#L3497
A crackmapexec run across a network segment crashed with the error message "TypeError: argument should be integer or bytes-like object, not 'str'".
It seems that
get_server_lanman
returns a bytes object. I worked around this crash by modifying the two arguments to the find function to bytes objects as well (b'Windows 2000''
andb'Samba'
).Due to lack of code knowledge, I do not know if this is the correct fix and therefore did not directly propose a pull request.
Edit: The issue seems to be more complex. The same code line now crashed on another network segment with the error "TypeError: must be str, not bytes". Apparently,
get_server_lanman
can return both bytes and str.The text was updated successfully, but these errors were encountered: