diff --git a/socks.py b/socks.py index 83b1435..3ea4462 100644 --- a/socks.py +++ b/socks.py @@ -488,9 +488,9 @@ def _SOCKS5_request(self, conn, cmd, dst): "Server requested username/password" " authentication") - writer.write(b"\x01" + chr(len(username)).encode() + writer.write(b"\x01" + (len(username)).to_bytes() + username - + chr(len(password)).encode() + + (len(password)).to_bytes() + password) writer.flush() auth_status = self._readall(reader, 2)