Python 全自动解密解码神器 — Ciphey

admin 2021年9月23日09:36:00评论267 views字数 2274阅读7分34秒阅读模式

来自公众号:Python实用宝典

Python 全自动解密解码神器 — Ciphey

Ciphey 是一个使用自然语言处理和人工智能的全自动解密/解码/破解工具。

简单地来讲,你只需要输入加密文本,它就能给你返回解密文本。就是这么牛逼。

有了Ciphey,你根本不需要知道你的密文是哪种类型的加密,你只知道它是加密的,那么Ciphey就能在3秒甚至更短的时间内给你解密,返回你想要的大部分密文的答案。

下面就给大家介绍 Ciphey 的实战使用教程。

1.准备



开始之前,你要确保Python和pip已经成功安装在电脑上,如果没有,可以访问这篇文章:超详细Python安装指南 进行安装。

(可选1) 如果你用Python的目的是数据分析,可以直接安装Anaconda:Python数据分析与挖掘好帮手—Anaconda,它内置了Python和pip.

(可选2) 此外,推荐大家用VSCode编辑器,它有许多的优点:Python 编程的最好搭档—VSCode 详细指南

请选择以下任一种方式输入命令安装依赖
1. Windows 环境 打开 Cmd (开始-运行-CMD)。
2. MacOS 环境 打开 Terminal (command+空格输入Terminal)。
3. 如果你用的是 VSCode编辑器 或 Pycharm,可以直接使用界面下方的Terminal.

pip install -U ciphey


2.Ciphey 基本使用



有3种方法可以运行 Ciphey:

1. 文件输入:

ciphey -f encrypted.txt
# 或
python -m ciphey -f encrypted.txt


2.不规范的方法:

ciphey -- "Encrypted input"
# 或
python -m ciphey -- "Encrypted input"


3.正常方式

ciphey -t "Encrypted input"
# 或
python -m ciphey -t "Encrypted input"


如下图所示:

Python 全自动解密解码神器 — Ciphey

要去除进度条、概率表和所有噪音,请使用安静模式:

ciphey -t "encrypted text here" -q


3.在Python中调用Ciphey



如果你需要在Python中使用Ciphey,请这样使用:

# Python实用宝典
# 2021/07/19
from ciphey.__main__ import main, main_decrypt, make_default_config
main_decrypt(make_default_config("SGVsbG8gbXkgbmFtZSBpcyBiZWUgYW5kIEkgbGlrZSBkb2cgYW5kIGFwcGxlIGFuZCB0cmVl"))
# >> Hello my name is bee and I like dog and apple and tree


运行后会输出如下的结果:

Python 全自动解密解码神器 — Ciphey


效果还是相当不错的,如果你不想输出概率表,只想要解密内容,代码需要这么写:

# Python实用宝典
# 2021/07/19
from ciphey.__main__ import main, main_decrypt, make_default_config
config = make_default_config("SGVsbG8gbXkgbmFtZSBpcyBiZWUgYW5kIEkgbGlrZSBkb2cgYW5kIGFwcGxlIGFuZCB0cmVl")
config["grep"] = True
main_decrypt(config)
# >> Hello my name is bee and I like dog and apple and tree


Python 全自动解密解码神器 — Ciphey

非常Nice,你根本无需知道这是什么密文/编码。

Ciphey 支持解密的密文和编码多达51种,下面列出一些基本的选项

基本密码:

  • Caesar Cipher

  • ROT47 (up to ROT94 with the ROT47 alphabet)

  • ASCII shift (up to ROT127 with the full ASCII alphabet)

  • Vigenère Cipher

  • Affine Cipher

  • Binary Substitution Cipher (XY-Cipher)

  • Baconian Cipher (both variants)

  • Soundex

  • Transposition Cipher

  • Pig Latin

现代密码学:

  • Repeating-key XOR

  • Single XOR

编码:

  • Base32

  • Base64

  • Z85 (release candidate stage)

  • Base65536 (release candidate stage)

  • ASCII

  • Reversed text

  • Morse Code

  • DNA codons (release candidate stage)

  • Atbash

  • Standard Galactic Alphabet (aka Minecraft Enchanting Language)

  • Leetspeak

  • Baudot ITA2

  • URL encoding

  • SMS Multi-tap

  • DMTF (release candidate stage)

  • UUencode

  • Braille (Grade 1)

  • ......

Ciphey 的功能不仅于本文介绍的这些,本文所介绍的只是冰山一角,它还可以添加属于你自己的解码器:

https://github.com/Ciphey/Ciphey/wiki/Adding-your-own-ciphers

如果要进一步的学习,你可以在上述 Ciphey 的 Github Wiki 介绍中,查阅到更多的资料,进行更深层次的学习。

我们的文章到此就结束啦,如果你喜欢今天的Python 实战教程,请持续关注Python实用宝典。

--- EOF ---


推荐↓↓↓

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2021年9月23日09:36:00
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   Python 全自动解密解码神器 — Cipheyhttps://cn-sec.com/archives/553901.html

发表评论

匿名网友 填写信息