Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnicodeDecodeError when sending ADWS requests using Subtree #7

Open
j4s0nmo0n opened this issue Jan 21, 2025 · 0 comments
Open

UnicodeDecodeError when sending ADWS requests using Subtree #7

j4s0nmo0n opened this issue Jan 21, 2025 · 0 comments

Comments

@j4s0nmo0n
Copy link

j4s0nmo0n commented Jan 21, 2025

Hello,

First for all, thank you for your project. It is incredible and I am currently using it for another project.
I a currently experiencing an issue when I send a request expecting a big response from ADWS Server. For instance, I created an ADWS client thank to net.tcp-proxy, but when I send a request like this:

<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
<s:Header>
<a:Action s:mustUnderstand="1">http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action>
ldap:389
<a:MessageID>{message_id}</a:MessageID>
<a:ReplyTo>
<a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
</a:ReplyTo>
<a:To s:mustUnderstand="1">{uri_enumeration}</a:To>
</s:Header>
<s:Body>



(!boss=*)
{base_object}
Subtree



d:objectSID
d:objectGUID
d:distinguishedName


</s:Body>
</s:Envelope>

I have an unicode error:

File "/path/to/the/projetct/net.tcp-proxy/env/lib/python3.12/site-packages/wcf/datatypes.py", line 164, in parse
return cls(fp.read(lngth).decode('UTF-8'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x98 in position 53: invalid start byte

and I am wondering if the problem is from the amount of data in the answer?

I made a few investigation on that said datatypes.py, and I noticed that utf-8 is indeed used for decoding data, but I don't know how to handle it.

Could you help me?

Hope my question makes sense and I can give the code I wrote if needed.

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant