From f0ec72c4c4fae73a0f89b44825144fefe0b622f4 Mon Sep 17 00:00:00 2001 From: Akkariiin Date: Thu, 28 Sep 2017 14:24:04 +0800 Subject: [PATCH] fix anth_chain_f cannot use, anth_chain_f now can run --- shadowsocks/obfsplugin/auth_chain.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shadowsocks/obfsplugin/auth_chain.py b/shadowsocks/obfsplugin/auth_chain.py index 66fce90..6619f4f 100644 --- a/shadowsocks/obfsplugin/auth_chain.py +++ b/shadowsocks/obfsplugin/auth_chain.py @@ -895,14 +895,14 @@ class auth_chain_f(auth_chain_e): self.data_size_list0 = [] random = xorshift128plus() # key xor with key_change_datetime_key - new_key = list(key) + new_key = bytearray(key) for i in range(0, 8): - new_key[i] = to_str(to_bytes(new_key[i]) ^ self.key_change_datetime_key_bytes[i]) + new_key[i] ^= self.key_change_datetime_key_bytes[i] random.init_from_bin(new_key) # 补全数组长为12~24-1 list_len = random.next() % (8 + 16) + (4 + 8) for i in range(0, list_len): - self.data_size_list0.append((int)(random.next() % 2340 % 2040 % 1440)) + self.data_size_list0.append(int(random.next() % 2340 % 2040 % 1440)) self.data_size_list0.sort() old_len = len(self.data_size_list0) self.check_and_patch_data_size(random)