0
点赞
收藏
分享

微信扫一扫

buuctf-[QCTF2018]X-man-Keyword

求索大伟 2022-05-02 阅读 59

1.开局一张图片

2.用binwalk、stegsolve等没有发现异常。在kali用LSB-cloacked-pixel-master工具有内容

python2 lsb.py extract attachment.png 001.txt lovekfc

3.查看txt文本,得到密文

PVSF{vVckHejqBOVX9C1c13GFfkHJrjIQeMwf}

4.根据提示将keyword放到前面,从26个英文字母里把 “lovekfc”提出来放到前面制作密钥

lovekfcabdghijmnpqrstuwxyz

5.后根据密钥替换密文中的字母解密,使用python跑出此处Nihilist加密

# -*- coding:utf-8 -*-
import string

ciphertext = 'PVSF{vVckHejqBOVX9C1c13GFfkHJrjIQeMwf}'
secretkey = 'lovekfcabdghijmnpqrstuwxyz'
plaintext = ''

for letter in ciphertext:
    if letter in string.ascii_lowercase:
        index = secretkey.lower().index(letter)
        plaintext += string.ascii_lowercase[index]
        continue
    if letter in string.ascii_uppercase:
        index = secretkey.upper().index(letter)
        plaintext += string.ascii_uppercase[index]
        continue
    plaintext += letter

print(plaintext)

6.得到flag

 

举报

相关推荐

0 条评论