Commit c3785ae1 authored by Joel Martin's avatar Joel Martin

Remove proxy handshake debug.

parent ad873493
...@@ -105,7 +105,7 @@ def do_handshake(sock): ...@@ -105,7 +105,7 @@ def do_handshake(sock):
scheme = "ws" scheme = "ws"
print " using plain (not SSL) socket" print " using plain (not SSL) socket"
handshake = retsock.recv(4096) handshake = retsock.recv(4096)
print "handshake: " + repr(handshake) #print "handshake: " + repr(handshake)
h = parse_handshake(handshake) h = parse_handshake(handshake)
# Parse client settings from the GET path # Parse client settings from the GET path
...@@ -127,8 +127,7 @@ def do_handshake(sock): ...@@ -127,8 +127,7 @@ def do_handshake(sock):
response = server_handshake % (pre, h['Origin'], pre, scheme, response = server_handshake % (pre, h['Origin'], pre, scheme,
h['Host'], h['path'], pre, trailer) h['Host'], h['path'], pre, trailer)
print "sending response:", repr(response) #print "sending response:", repr(response)
retsock.send(response) retsock.send(response)
return retsock return retsock
...@@ -157,15 +156,7 @@ def gen_md5(keys): ...@@ -157,15 +156,7 @@ def gen_md5(keys):
num1 = int("".join([c for c in key1 if c.isdigit()])) / spaces1 num1 = int("".join([c for c in key1 if c.isdigit()])) / spaces1
num2 = int("".join([c for c in key2 if c.isdigit()])) / spaces2 num2 = int("".join([c for c in key2 if c.isdigit()])) / spaces2
packed = struct.pack('>II8s', num1, num2, key3) return md5(struct.pack('>II8s', num1, num2, key3)).digest()
digest = md5(packed).digest()
print "num1:", num1
print "num2:", num2
print "key3:", repr(key3)
print "packed:", packed
print "digest:", repr(digest)
return digest
def daemonize(): def daemonize():
os.umask(0) os.umask(0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment