攻防世界 - game
用ida打开,shift+f12找到字符串
ctrl+x 然后 f5找到c语言函数

看函数:
先定义了一些char类型的变量,下面赋值

最后进行运算


变成同一行

按住alt选中前几个字符删去,最后得到两个数组
总而言之,就是用python写个脚本,把ida上的运算算出来

a=[123,32,18,98,119,108,65,41,124,80,125,38,124,111,74,49,83,108,94,108,84,6,96,83,44,121,104,110,32,95,117,101,99,123,127,119,96,48,107,71,92,29,81,107,90,85,64,12,43,76,86,13,114,1,117,126,0]
b=[18,64,98,5,2,4,6,3,6,48,49,65,32,12,48,65,31,78,62,32,49,32,1,57,96,3,21,9,4,62,3,5,4,1,2,3,44,65,78,32,16,97,54,16,44,52,32,64,89,45,32,65,15,34,18,16,0]
flag=""
for i in range(56):
	a[i]=a[i]^b[i]
	a[i]=a[i]^(0x13)
	flag+=chr(a[i])
print(flag)

记得数组用

 posted on 2020-04-14 19:51  My_serendipity  阅读(673)  评论(0编辑  收藏  举报