From 1e46ec49da749efc008d095b2c7d38b79aa7098d Mon Sep 17 00:00:00 2001 From: BM-NBtA54BMK4ps9ZRUDiug4VtPKPpYsTp5 Date: Thu, 22 Feb 2018 06:39:28 +0000 Subject: [PATCH] Fix processing SOCKS5 METHOD selection message --- src/network/socks5.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)