Ciphey在windows上安装及使用

Ciphey在windows上安装及使用

Ciphey介绍

基于深度学习的文本自动解密算法。

项目地址:https://github.com/Ciphey/Ciphey

感兴趣的可以看看这篇文章:https://cuijiahua.com/blog/2020/08/dl-24.html

Ciphey安装

注意!!!
  • 不能是 python3.9版本(因为我自己是3.9会有问题,后来选择用pycharm3.8的虚拟环境)

  • 不能是 python 32位版本

  • 建议使用 python 3.8 64位版本:python-3.8.10-amd64.exe
    python官网:https://www.python.org/downloads/

使用pip安装即可
pip install ciphey  -i https://pypi.mirrors.ustc.edu.cn/simple/
windows编码错误修改
UnicodeDecodeError: 'gbk' codec can't decode byte 0xbf

根据错误修改代码,主要是在读取文件的时候发生错误,将"r" 改为"rb",即可。

Ciphey 使用演示

出题脚本
#coding:utf-8
import random
import base64
import string
import hashlib
def flag2():
    a = string.printable
    flag = ""
    for i in range(10):
        flag += a[random.randint(0, 99)]
    flag = r"flag{%s}"%(hashlib.md5(flag.encode()).hexdigest())
    return flag
flag=flag2().encode()

def b32(m2):
    return base64.b32encode(m2)
def b64(m3):
    return base64.b64encode(m3)
b=random.randint(10,20)


for i in range(b):
    a=random.choice('ab')
    if a=='a':
        flag=b64(flag)
    if a=='b':
        flag=b32(flag)
with open("1.txt","wb") as f:
    f.write(flag)
解码方式
ciphey -t "aGVsbG8gbXkgbmFtZSBpcyBiZWU="

ciphey -f 文件名
我遇到的问题
  • 运行中存在卡死,需要关闭终端后在运行
测试

1.可以解混合的base64 base32 base85 的编码

2.可以解有单词含义的16进制,没有意义的解不了

3.可以有单词含义的凯撒密码

pycharm测试图片
在这里插入图片描述

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值