题目:[HUBUCTF 2022 新生赛]baby_encrypt
hint:
781612443113954655886887407898899451044114412011257135914071455155316031651170318041861191719652013207021272183228423832485254125932643269827992924
注意查看前面的数字,这题不想现代密码,
chr(78)
chr(161-78)
chr(244-161)
chr(311-244)
chr(395-311)
chr(465-395)
###
N
S
S
C
T
F
就是将flag转化为前面的ascll码数字相加
这题反映了不一定要多强,主要你不放弃,就有可能做出来,
特别注意数字转ascll码
写代码直接解:
整理一下
78,161,244,311,395,465,588,688,740,789,889,945,1044,1144,1201,1257,1359,1407,1455,1553,1603,1651,1703,1804,1861,1917,1965,2013,2070,2127,2183,2284,2383,2485,2541,2593,2643,2698,2799,2924
s=[0,78,161,244,311,395,465,588,688,740,789,889,945,1044,1144,1201,1257,1359,1407,1455,1553,1603,1651,1703,1804,1861,1917,1965,2013,2070,2127,2183,2284,2383,2485,2541,2593,2643,2698,2799,2924]
flag=""
for i in range(0,len(s)-1):
c=chr(s[i+1]-s[i])
flag=flag+c
print(flag)
#NSSCTF{d41d8cd98f00b204e9800998ecf8427e}
注意数组里面第一个位置0的运用,没有0没有N,这是数组索引的关系,第一个位置为0