The client makes a GET request on some websites, like https://www.youtube.com. This request is redirected to my proxy server, which gets all of the data. Then i try to decode('UTF-8') it, but i get error
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfc in position 8: invalid start byte
I suppose this is because of SSL/TLS encryption? But then there is a question ---> How do I catch an SSL/TLS key using python sockets?
This error is because there are non-ASCII characters and that can't be encoded or decoded.
There is one way to avoid this is to use the encode() function.
Let your string is x
x.encode('utf-8').strip()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With