From 1c49b9c6889c133c99ceea5b0155ce8a511b22d0 Mon Sep 17 00:00:00 2001 From: clowwindy Date: Fri, 20 Apr 2012 22:42:18 +0800 Subject: [PATCH] fix new() problem --- local.py | 2 +- server.py | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/local.py b/local.py index 6e64b6f..d4ca21a 100755 --- a/local.py +++ b/local.py @@ -35,7 +35,7 @@ import time import SocketServer def get_table(key): - m = hashlib.md5.new() + m = hashlib.md5() m.update(key) s = m.digest() (a, b) = struct.unpack('H", local[1]) + reply += socket.inet_aton(local[0]) + struct.pack(">H", + local[1]) print 'Tcp connect to', addr, port[0] else: reply = "\x05\x07\x00\x01" # Command not supported