美文网首页
Python Challenge[21]

Python Challenge[21]

作者: Recgat | 来源:发表于2017-02-18 01:01 被阅读0次

    [Level 21]

    We used to play this game when we were kids
    When I had no idea what to do, I looked backwards.

    再加一个package.pack文件,就是[Level 21]了。没想出来,依旧百度谷歌。

    游戏指的是击鼓传花,我们要做的是根据数据内容判断使用zlib或bz2解压package.pack文件,并对每一步骤进行标记。

    import zlib,bz2
    f = open('package.pack','rb').read()
    while True:
      if f.startswith(b'BZ'):
        f = bz2.decompress(f)
      elif f.startswith(b'x\x9c'):
        f = zlib.decompress(f)
      elif f.endswith(b'\x9cx'):
        f = f[::-1]
      else:
        break
    

    最终解出来的数据d是b'sgol ruoy ta kool',即look at your logs,result是copper,22关的钥匙,[Level 22]

    Python Challenge Wiki

    相关文章

      网友评论

          本文标题:Python Challenge[21]

          本文链接:https://www.haomeiwen.com/subject/qslrwttx.html