Danny-Dasilva / CycleTLS

Spoof TLS/JA3 fingerprints in GO and Javascript
GNU General Public License v3.0
823 stars 163 forks source link

Problem when sending binary data #297

Open liteCarma opened 6 months ago

liteCarma commented 6 months ago

Description

For buffer serialization you use utf8 (Buffer.concat(chunks).toString('utf8') ), the problem is that if encoding is 'utf8' and a byte sequence in the input is not valid UTF-8, then each invalid byte is replaced with the replacement character U+FFFD. Could you use Buffer.concat(chunks).toString('base64 ') instead?

Issue Type

Bug

Operating System

Windows 10

Node Version

Other

Golang Version

Other

Relevant Log Output

No response

fyxtc commented 6 months ago

Same issue, can not decode gbk correctly

Danny-Dasilva commented 5 months ago

Will likely do a version bump that will support just streaming the binary data directly as the decoding has been causing issues for a while now.