不嘻嘻,签到题做了两天,先用pyinstxtractor.py(找最新版本。。红温)把exe转化为pyc,用在线反编译pycdc来反编译,最后的key在一个文件夹里key.pyc切记用python3.3版本(红温)。







# 假设已经有了正确的密钥key_bytes
key_bytes = b'V3rY_v3Ry_Ez' # 这里需要填入正确的密钥
# 游戏初始化和解密函数(根据提供的代码片段)
def initialize(key):
key_length = len(key)
S = list(range(256))
j = 0
for i in range(256):
j = (j + S[i] + key[i % key_length]) % 256
S[i], S[j] = S[j], S[i]
return S
def generate_key_stream(S, length):
i = j = 0
key_stream = []
for _ in range(length):
i = (i + 1) % 256
j = (j + S[i]) % 256
S[i], S[j] = S[j], S[i]
key_stream.append(S[(S[i] + S[j]) % 256])
return key_stream
def decrypt(data, key):
S = initialize(key)
key_stream = generate_key_stream(S, len(data))
decrypted_data = bytes([i ^ data[i] ^ key_stream[i] for i in range(len(data))])
return decrypted_data
# 要解密的数据
data = (101, 97, 39, 125, 218, 172, 205, 3, 235, 195, 72, 125, 89, 130, 103, 213, 120, 227, 193, 67, 174, 71, 162, 248, 244, 12, 238, 92, 160, 203, 185, 155)
# 使用密钥解密数据
decrypted_data = decrypt(bytes(data), key_bytes)
# 打印解密后的数据
print('Decrypted flag:', decrypted_data.decode())










![Python自动化测试系列[v1.0.0][自动化测试报告]](https://img-blog.csdnimg.cn/20191209211228341.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2Rhd2VpX3lhbmcwMDAwMDA=,size_16,color_FFFFFF,t_70)







