1.打开txt文件很像16进制字符串,但是16进制字符串为A-F所以考虑到将字母进行顺序移位,脚本如下
# 定义一个字符串
string = "GHIJKLMNOPK"
# 定义映射关系字典
mapping_dict = {
"G": "A",
"H": "B",
"I": "C",
"J": "D",
"K": "E",
"L": "F"
}
# 将字符串中的G-K按顺序转换为A-F
result = ""
for char in string:
if char in mapping_dict:
result += mapping_dict[char]
else:
result += char
print(result)
2.将字符串放入脚本得到移位后的字符串,并将转换后的字符串放入winhe中得到base64字符
3.将base64字符串进行base32解码得到密文
4.再将字符串进行base85解密得到flag
flag: flag{22be72da5c9c847c2b8a029ced6603c4}