re | [QCTF2018]Xman-babymips

re | [QCTF2018]Xman-babymips

mips32架构的题目
位运算,前5位直接xor,后面再加密一次。
直接爆破就好

exp:

aim = [82, 253, 22, 164, 137, 189, 146, 128, 19, 65, 84, 160, 141, 69, 24, 129, 222, 252, 149, 240, 22, 121, 26, 21, 91, 117, 31]

flag = []
for i in range(5, len(aim)+5):
	for j in range(33,127):
		tmp = j ^ (32-i)
		if (i & 1) != 0:
			v1 = (tmp >> 2) | (tmp << 6)
		else:
			v1 = (4 * tmp) | (tmp >> 6)
		v1 = v1 & 0xff
		if v1 == aim[i-5]:
			print(chr(j),end='')
			break


posted @ 2023-01-08 11:36  Mz1  阅读(45)  评论(0编辑  收藏  举报