msic Funzip
Funzip writeup解题思路
1.打开题目发现是一个base64
2.看了一遍后发现他不是很全于是写一个脚本进行补全
wf = open("5.txt", "w")
with open("1 (2).txt", "r") as f:
data = f.read()
data = data.splitlines()
for line in data:
missing_padding = len(line) % 4
if missing_padding != 0:
line += "=" * (4 - missing_padding)
wf.write(line + "\n")
wf = open("5.txt", "w")
with open("1 (2).txt", "r") as f:
data = f.read()
data = data.splitlines()
for line in data:
missing_padding = len(line) % 4
if missing_padding != 0:
line += "=" * (4 - missing_padding)
wf.write(line + "\n")
3.补全后的base64
4.根据之前的做题经验发现这是一个隐写于是再写一个脚本去解开隐写得出flag
q='''VTFSS2MyUldhM2xsUkZaaFVqRlZORmxXWXpWbGJWSkpVMjE0V2xaNlFYSlJNbU01VUZG
VTFSS2MyUldhM2xsUkVaaFVqRlZORmw2VGxObFYwWllUbGMxVVZveU9EbEVVUW==
VTFSS2MyUldhM2xsUkVaaFVqRlZORmRVVGs5TlIwNTBZa2hXWVdWcVVreEVWcK==
VTFSS2MyUldhM2xsUkVaaFVqRlZORmRVVGs5TlJuVklZa2hhVVZveU9EbEVVUV==
VTFSS1UySkdjSFJpU0ZaaFZUQktNRmRXYUc5a1ZXeEZZWHBXVUZWWE9EbEVaQh==
VVRKak9WQlJNY0==
V2tab1QyTkhTblJaTW1ScFlsVmFNVmRzYUU5a01XeFlWRzE0U2xORk5IZFhhMUo2VTNjeI==
VVRKak9WQlJNTk==
VjFSS2IyRkhUbkJWYlhCYVZtNVNNRmRXYUc5a1ZtaFdaREprV2sxcmNHbFpiR1JIVGtkS2M/MUVaRVJhZWpBNVJGV/==
VVRKak9WQlJNVl==
V1Zaak1VMUZiRWhVYmxKcVVUSm9ObHBGYUV0alIycDBXVEprV2xVelpHNVplazVUWlZkR1dFNVhOVXBTTW14M1VUSmpPVkJSTWy=
V2xoa2RsQlJNZo==
VTFWT1Fsb3piRWhpUnpGTVVqTldNVmw2U25OT2JIQlVXak5DU2xKRVVtNVhWMnN4WlcxR1dX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tKYU1XdDVVbTFLYUZVelRqUlhSazVDWTJ4Q1ZGUllhRkJrTWpnNVJGUQ==
VTFWT1Fsb3diRVJSVjJSS1VUQkdibE5WVGtKYU1XdDVVbTFLYUZacVFtNVVSbEYzV2pBeGNXTXdjMDQ=
VTFWT1Fsb3diRVJSVjJSS1VUQkpOVkV5WXpsUVVUQQ=='''
e=q.splitlines()
binstr=""
base64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
for i in e:
if i.find("==") > 0:
temp = bin((base64.find(i[-3]) & 15))[2:]
binstr += "0" * (4 - len(temp)) + temp
elif i.find("=") > 0:
temp = bin((base64.find(i[-2]) & 3))[2:]
binstr += "0" * (2 - len(temp)) + temp
str = ""
for i in range(0, len(binstr), 8):
str += chr(int(binstr[i:i+8], 2))
print(str)
5.运行得出flag
ISCC{jQHOZ9fV4Nhz}