附件是网页上的一篇文章,先复制到txt中保存。

2. 分析

如下是文章开头:

(additional editing by jose menendeZ)

thE adventuRes Of
sherlOck holmes

by

sir arthur coNan doylE

奇怪之处是有些位置不应该使用大写字母,但是使用了大写字母,推断这些大写字母是用来传递消息的。将文章中的所有大写字母提取出来,得到一串全部由ZERO与ONE组成的字符串,ZERO替换为数字0,ONE替换为数字1,从而得到一个二进制表示的数,再将此数转换为字符串即可。

3. 解题

Python代码如下:

from string import uppercase
from Crypto.Util.number import long_to_bytes

def solve():
    with open('paper','r') as f:
        data=f.read()
    cip=''
    for c in data:
        if c in uppercase:
            cip+=c
    cip=cip.replace('ZERO','0')
    cip=cip.replace('ONE','1')
    return long_to_bytes(long(cip,2))

if __name__=='__main__':
    print solve()

程序运行结果如下:

$ python solve.py
BITSCTF{h1d3_1n_pl41n_5173}

相关文章:

  • 2022-01-11
  • 2021-10-18
  • 2021-12-18
  • 2021-11-06
  • 2021-07-02
  • 2021-09-09
  • 2021-09-21
  • 2021-07-27
猜你喜欢
  • 2021-10-11
  • 2021-11-15
  • 2021-05-22
  • 2022-01-23
  • 2021-12-03
  • 2021-05-20
  • 2021-09-12
相关资源
相似解决方案