题目内容
4nXna/V7t2LpdLI44mn0fQ==
双等号,疑似base64编码,尝试解密
得到?u?k?{?b?t?8?i?}
问号内容应该是超过了ascii编码可打印字符范围32~126
编写python脚本验证一下
key = '4nXna/V7t2LpdLI44mn0fQ=='
cipher = base64.b64decode(key)
num = 1
flag = ''
for i in cipher:
print(i)
得到其ascii码为
226,117,231,107,245,123,183,98,233,116,178,56,226,105,244,125
观察可发现奇数位的ascii码均超过可打印字符范围
于是编写python脚本,奇数位的ascii码-128,再转化成字符
key = '4nXna/V7t2LpdLI44mn0fQ=='
cipher = base64.b64decode(key)
num = 1
flag = ''
for i in cipher:
if num%2 == 1:
flag +=chr(i-128)
else:
flag +=chr(i)
num +=1
print(flag)
得到flag
bugku{7bit28bit}
【世事难事,事情摆不平,先将自己的心坎摆平了,日子总能过得下去,甚至都不会觉得自己有多苦】