把题目给的附件解压后给了张图片,顺带着瞟一眼属性,没有值得注意的
binwalk检测一手,看见有个rar压缩包
提取出来的压缩包是有密码的,但是题目并没有给出获取密码的途径,所以先爆破试试,用最常用的四位数爆破
果然是四位数密码的爆破,flag.txt里面是一大串的乱码
用python脚本进行字频统计
import collections
def count_characters(filename):
with open(filename, 'r', encoding='utf-8') as file:
content = file.read()
counter = collections.Counter(content)
return counter
def print_sorted_counts(counter):
for char, count in counter.most_common():
print(f"'{char}': {count}")
def main():
filename = input("请输入文本文件的路径:")
try:
char_counts = count_characters(filename)
print_sorted_counts(char_counts)
except FileNotFoundError:
print("文件未找到,请检查路径是否正确。")
except Exception as e:
print(f"发生错误:{e}")
if __name__ == "__main__":
main()
flag:flag{gaki_IsMyw1fe}