DevanTQ/Ford

GitHub: DevanTQ/Ford

FORD 是一个多层级编码自动解码与 IOC 提取的命令行取证工具,专为 CTF 竞赛和数字取证调查中快速解析复杂编码字符串而设计。

Stars: 1 | Forks: 0

FORD
![Python](https://img.shields.io/badge/python-3.8+-brightgreen?style=flat-square&logo=python&logoColor=white&labelColor=1a1a2e&color=00c896) ![License](https://img.shields.io/badge/license-MIT-blue?style=flat-square&labelColor=1a1a2e&color=4f8ef7) ![Version](https://img.shields.io/badge/version-3.7-red?style=flat-square&labelColor=1a1a2e&color=e85d5d) ![Platform](https://img.shields.io/badge/platform-linux%20%7C%20windows%20%7C%20macos-informational?style=flat-square&labelColor=1a1a2e&color=8b5cf6) ![Zero Dependency](https://img.shields.io/badge/zero--dependency-yes-success?style=flat-square&labelColor=1a1a2e&color=00c896)
## 预览 ![预览](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/9c194b2e6c111502.png) ![Flag 识别](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/cdffd43ad1111510.png) ## 功能 | | | |---|---| | 🔍 **自动识别** | Base64, Base32, Base64-URL, Base85, Base58, Hex, Binary, ROT13/47, 全部 25 种 Caesar 位移, URL 编码, HTML 实体 | | 🔗 **多层链式解码** | `--depth` 将解码输出递归地反馈回所有解码器 | | 💣 **XOR** | 通过 `--xor` 进行静态单字节解码,或自动爆破 0x01–0xFF | | 🚩 **IOC 提取** | 自动高亮 CTF flag `WORD{...}`, IPv4, 电子邮件和 URL | | 🧬 **哈希识别** | 根据摘要长度识别 MD5 / SHA-1 / SHA-224 / SHA-256 / SHA-384 / SHA-512 | | 🗂️ **Magic bytes** | 检测二进制输出中的 PNG, JPEG, ZIP, RAR, ELF, PE, PDF, MP3 | | 📊 **香农熵** | 为每个结果显示熵值,以评估加密强度 | | 💾 **输出到文件** | `--output` 保存去除 ANSI 代码的纯净报告 | | 🪟 **Windows 支持** | 自动启用 VT100/ANSI,在旧版 CMD 上平滑降级 | | 🔁 **Stdin 管道** | `echo "..." \| ford` | ## 安装 ``` git clone https://github.com/DevanTQ/Ford.git cd Ford pip install -e . ``` `ford` 现已可在系统全局使用 —— 无需设置别名。 **包含 Base58 支持(可选):** ``` pip install -e "[full]" ``` ## 用法 ``` ford "[encoded_text]" ford "[encoded_text]" --depth 3 ford "[hex_string]" --xor 0x42 ford "[encoded_text]" --output results.txt echo "aGVsbG8=" | ford ``` ### 标志 | 标志 | 描述 | |------|-------------| | `--depth N` | 递归解码深度,1–5(默认:1) | | `--xor 0xKEY` | 使用给定密钥进行单字节 XOR | | `--output FILE` | 将纯文本报告保存到文件 | | `--all` | 强制显示所有弱启发式结果 | | `--no-banner` | 隐藏头部横幅 | | `-v / --version` | 打印版本号并退出 | ## 示例 ``` # 基础 Base64 ford "aGVsbG8gd29ybGQ=" # 嵌套编码 — Base64 包裹在 Hex 中,深度为 2 层 ford "6147567362473867643239796247513d" --depth 2 # 使用已知密钥进行 XOR ford "2a3b1c4d" --xor 0x42 # XOR 暴力破解 — 无需密钥 ford "08040b0b0e" # 从 stdin 管道输入 echo "68656c6c6f" | ford # 保存报告到文件 ford "dGVzdA==" --output report.txt # 显示所有结果,包括弱匹配 ford "aGVsbG8=" --all ``` ## 环境要求 - Python 3.8+ - 无必须的第三方包 - 可选:`base58` · `colorama`(用于旧版 Windows CMD) ## 项目结构 ``` Ford/ ├── ford.py ← main tool ├── pyproject.toml ← build config & CLI entrypoint ├── requirements.txt ← optional dependencies ├── LICENSE ├── README.md └── tests/ └── test_ford.py ← 35 unit tests ``` ## 运行测试 ``` pip install pytest python -m pytest tests/ -v ``` ## 开源许可证 MIT — 详见 [LICENSE](LICENSE)
DevanTQ 构建 · 献给 CTF、DFIR 以及所有长时间盯着编码字符串看的人
标签:Python, 安全规则引擎, 密码分析, 数字取证, 文档结构分析, 无后门, 自动化脚本, 逆向工具