复现一道前几个月打的2023江苏省数据安全竞赛的逆向题
ezcalc
整体就异或
解题过程:
#第一段
flag1 = ''
str1 = [21, 25, 17, 2, 9, 7, 24, 10, 6, 14,
29, 5, 6, 16, 95, 95]
enc1 = [115, 117, 112, 101, 114, 99, 97, 108, 105, 102,
114, 97, 103, 105, 108, 105]
for i in range(len(enc1)):
flag1 += chr(str1[i]^enc1[i])
print(flag1,end="")
#第二段
str2 = [75, 70, 95, 0, 2, 72, 17, 92, 82, 93,
27, 7, 86, 0, 14, 87]
enc2 = [115, 116, 105, 99, 101, 120, 112, 105, 97, 108,
105, 100, 111, 99, 105, 111]
for i in range(len(enc2)):
for j in range(32,127):
if enc2[i] ^ j == str2[i]:
print(chr(j),end="")
#第三段
str3 = [117, 115, 99, 97, 110, 100, 121, 99]
enc3 = [ 0x0C, 0x04, 0x57, 0x02, 0x5C, 0x1C, 0x15, 0x53]
for i in range(len(str3)):
for j in range(32,127):
if str3[i] ^ j == enc3[i]:
print(chr(j),end="")
#第四段
str4= [0x61,0x6e]
enc4 = [0x59,0x13]
for i in range(len(enc4)):
for j in range(32,127):
if str4[i] ^ j == enc4[i]:
print(chr(j),end="")
#flag{dyfohoday36826cg0a531rc9cg8yw4c2xl08}