
Chepy 是一个 Python 库,附带一个方便的 CLI,旨在镜像 CyberChef 的部分功能。为了使 Chepy 与 CyberChef 提供的各种功能兼容,投入了相当多的精力,全部以纯 Python 风格实现。Chepy 相对于 CyberChef 有一些关键的优点和缺点。CyberChef 的 堆叠 不同模块的概念在 Chepy 中得以保留。
Chepy 还有很长的路要走,因为它并没有提供 CyberChef 的所有功能。
Chepy 具有与 CyberChef 类似的堆叠机制。例如,在 CyberChef 中:
等价于:
from chepy import Chepy
file_path = "/tmp/demo/encoding"
print(
Chepy(file_path)
.load_file()
.reverse()
.rot_13()
.from_base64()
.from_base32()
.hexdump_to_str()
.o
)
magic 功能。Chepy 可以通过几种方式安装。
pip3 install chepy
# 可选地安装额外依赖
pip3 install chepy[extras]
git clone --recursive https://github.com/securisec/chepy.git
cd chepy
pip3 install -e .
# 我使用 -e 以便之后通过 git pull 更新时,无需重新安装(除非依赖关系发生变化)
也可以将 Chepy 构建为独立的二进制文件。这包括将所有依赖打包在一起。
git clone https://github.com/securisec/chepy.git
cd chepy
pip install .
pip install pyinstaller
pyinstaller cli.py --name chepy --onefile
二进制文件将在 dist/ 文件夹中。
.. toctree::
:maxdepth: 3
:caption: 目录:
usage.md
examples.md
cli.rst
chepy.md
core.md
modules.rst
extras.rst
plugins.md
pullrequest.md
config.md
faq.md
索引和表格
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`