Socks5 parsing fix

- Fixes #1134
- Came over BM, thank you kind stranger
This commit is contained in:
Peter Šurda 2018-02-26 20:04:57 +01:00
parent 140265621f
commit 0da0c10995
Signed by untrusted user: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ class Socks5(Proxy):
return True
def state_auth_1(self):
ret = struct.unpack('BB', self.read_buf)
ret = struct.unpack('BB', self.read_buf[:2])
if ret[0] != 5:
# general error
raise GeneralProxyError(1)