网鼎杯半决赛流量分析
可以直接客户端连接然后输入key
![[d06d90f5df96b5e00ed292ac93ceefd5.png]]
key:
![[d1b9d0ae53510ed71e2e979d7af937dc.png]]
也可以静态分析
v11 = 0
v12 = 0
v10 = 0
key = [87, 97, 110, 103, 68, 105, 110, 103, 67, 85, 80, 75, 69, 89, 33, 33]
enc = [29, 55, 217, 91, 240, 162, 50, 198, 48, 167, 140, 80, 126,
62, 167, 58, 186, 192, 88, 107, 129, 133, 107, 28, 76, 245,
128, 124, 138, 193, 66, 151, 144, 199]
S = [0 for i in range(256)]
for i in range(256):
S[i] = i
for j in range(256):
v3 = S[j] + v11 & 0xff
v11 = (v3 + key[j % len(key)]) & 0xff
v6 = S[j] & 0xff
S[j] = S[v11] & 0xff
S[v11] = v6 & 0xff
for k in range(34):
v10 = (v10 + 1) & 0xff
v12 = (S[v10] + v12) & 0xff
v7 = S[v10] & 0xff
S[v10] = S[v12] & 0xff
S[v12] = v7 & 0xff
enc[k] ^= S[((S[v10] + S[v12]) & 0xff)] ^ 0x25
for i in enc:
print(chr(i), end='')