栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

BUUCTF-[QCTF2018]X-man-Keyword

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

BUUCTF-[QCTF2018]X-man-Keyword

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

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/850157.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号