diff --git a/src/network/socks5.py b/src/network/socks5.py index 52050ec9..83daa124 100644 --- a/src/network/socks5.py +++ b/src/network/socks5.py @@ -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[0:2]) if ret[0] != 5: # general error raise GeneralProxyError(1)