diff --git a/shadowsocks/common.py b/shadowsocks/common.py index cba287e..d585065 100644 --- a/shadowsocks/common.py +++ b/shadowsocks/common.py @@ -52,7 +52,7 @@ def inet_ntop(family, ipstr): return socket.inet_ntoa(ipstr) elif family == socket.AF_INET6: v6addr = b':'.join((b'%02X%02X' % (ord(i), ord(j))) - for i, j in zip(ipstr[::2], ipstr[1::2])) + for i, j in zip(ipstr[::2], ipstr[1::2])) return v6addr diff --git a/shadowsocks/crypto/salsa20_ctr.py b/shadowsocks/crypto/salsa20_ctr.py index d1910ea..0f5bfb8 100644 --- a/shadowsocks/crypto/salsa20_ctr.py +++ b/shadowsocks/crypto/salsa20_ctr.py @@ -72,7 +72,7 @@ def numpy_xor(a, b): def py_xor_str(a, b): c = [] - for i in xrange(0, len(a)): + for i in range(0, len(a)): c.append(chr(ord(a[i]) ^ ord(b[i]))) return ''.join(c) diff --git a/shadowsocks/encrypt.py b/shadowsocks/encrypt.py index 974785c..4997a6e 100644 --- a/shadowsocks/encrypt.py +++ b/shadowsocks/encrypt.py @@ -61,7 +61,7 @@ def get_table(key): s = m.digest() (a, b) = struct.unpack('