直接跟进就行这个程序流程很清楚,细心一点就行
#40位的flag,直接跟进,几个简单的处理,麻了,被10和11搞了一会心态(减的时候减错了)
#第一步:^0x401
#第二步:加i**2取低两位
#第三步:从第十位开始,^(i)(i+1)
#第四步:每个乘三
#第五步:隔两位,第一位与交换第二位
v3=[0]*40
v3[0] = 3279
v3[1] = 3264
v3[2] = 3324
v3[3] = 3288
v3[4] = 3363
v3[5] = 3345
v3[6] = 3528
v3[7] = 3453
v3[8] = 3498
v3[9] = 3627
v3[10] = 3708
v3[11] = 3675
v3[12] = 3753
v3[13] = 3786
v3[14] = 3930
v3[15] = 3930
v3[16] = 4017
v3[17] = 4173
v3[18] = 4245
v3[19] = 4476
v3[20] = 4989
v3[21] = 4851
v3[22] = 5166
v3[23] = 5148
v3[24] = 4659
v3[25] = 4743
v3[26] = 4596
v3[27] = 5976
v3[28] = 5217
v3[29] = 4650
v3[30] = 6018
v3[31] = 6135
v3[32] = 6417
v3[33] = 6477
v3[34] = 6672
v3[35] = 6891
v3[36] = 7056
v3[37] = 7398
v3[38] = 7650
v3[39] = 7890
def enc():
for i in range(28,9,-2):
print(i)
v3[i]^=v3[i+1]
v3[i+1]^=v3[i]
v3[i]^=v3[i+1]
for i in range(40):
v3[i]=round(v3[i]//3)
for i in range(40):
v3[i] += i
'''for i in range(20):
v3[i]^=(i*(i+1))'''
for i in range(11,30):
j=i-10
v3[i]^=(j)*(j+1)
'''for i in range(11,30):
v3[i]^=((i-11)*(i+1-11))'''
for i in range(40):
v3[i]-=i**2
for i in range(40):
v3[i]^=0x401
'''for i in range(40):
v3[i]&=0xff'''
enc()
print(v3)
for i in range(40):
print(chr(v3[i]),end='')
DASCTF{TWpnemRuSTRkVzVsWVhOMmJqZzNOREoy}