From 0e340dec5ea09a7f0c4663b232f6297d050c75d8 Mon Sep 17 00:00:00 2001 From: est Date: Mon, 14 Jan 2013 16:55:41 +0800 Subject: [PATCH] fix conn termination null data --- local.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local.py b/local.py index 6484874..899b8f8 100755 --- a/local.py +++ b/local.py @@ -103,7 +103,7 @@ class Socks5Server(SocketServer.StreamRequestHandler): sock = self.connection sock.recv(262) sock.send("\x05\x00") - data = self.rfile.read(4) + data = self.rfile.read(4) or '\x00' * 4 mode = ord(data[1]) if mode != 1: logging.warn('mode != 1')