python-wcfbin icon indicating copy to clipboard operation
python-wcfbin copied to clipboard

Unicode Decode Error - Utf8String - Data length problem? - Datatypes.py function

Open j4s0nmo0n opened this issue 11 months ago • 0 comments

Hello,

First for all, thank you for your project. It is incredible and I am currently using it for another project. I am experiencing an issue when I send a request expecting a big response from ADWS Server. For instance, I created an ADWS client (thank to nettcp-proxy and python-wcfbin) and I expect a lot of data as answer ( I mean something average 149 807 902 bytes). I suspect MultiByteInt31 class having trouble to handle that even when I tried to split data that are greater than (2^32 - 1) bytes. I don't know how to figure out this. Please find below my error:

Dictionary table: 149807902 bytes Traceback (most recent call last): File "/home/user/net.tcp-proxy/enumerate_clean2.py", line 330, in build_dictionary(fp, ('client', 'c>s')) File "/home/user/net.tcp-proxy/nettcp/protocol2xml.py", line 37, in build_dictionary string = Utf8String.parse(table) ^^^^^^^^^^^^^^^^^^^^^^^ File "/home/jo/jean-stuff/ADWS/net.tcp-proxy/env/lib/python3.12/site-packages/wcf/datatypes.py", line 163, in parse return cls(fp.read(lngth).decode('utf-8')) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd2 in position 0: invalid continuation byte

Once again, I expect a lot of data from the server that is why that is happening. When I send the same request knowing I will get back a few data, it works like charm.

Could you help me?

j4s0nmo0n avatar Jan 25 '25 20:01 j4s0nmo0n