应用场景

16进制数相邻位置交换

# 导入文本
with open('C:/Users/DELL/Desktop/WinHex64.txt', 'r') as f:
    content = f.read()
    content = content.strip().replace("\n"," ").replace(" ","")
    content=list(content)
    content[::2],content[1::2]=content[1::2],content[::2]
    result = ''.join(content)
    with open('C:/Users/DELL/Desktop/flag.txt', 'w') as g:
        g.write(result)

倒置

with open('desktop','rb') as f:
   with open('flag','wb') as g:
      g.write(f.read()[::-1])
最后修改:2023 年 02 月 23 日
如果觉得我的文章对你有用,请随意赞赏