🛠️ ctfscan – BLACKFLAG
Instant flag finder & decoder for CTFs.
Built by @Anuragmahipal
🦾 No GUI. No bloat. Just raw shell power.
⚔️ What is ctfscan?
ctfscan is a blazing-fast terminal utility for CTF players, reverse engineers, and anyone trying to slice through encoded clues and flag-filled binaries.
📦 Installs in seconds via pip.
⚡ Runs in a blink.
🕵️♂️ Built for real-world use.
🔥 Features
| 🔧 Tool | 📌 Purpose |
|---|---|
-ff |
Find flag{} / FLAG{} / CTF{} patterns |
-d64 |
Decode base64 data from file |
-dhex |
Decode hex strings (like shellcode) |
-scan |
Advanced analysis (exiftool, binwalk, strings) |
| Default mode | Auto-search for flag-like patterns |
🚀 Quick Start
Installation
Via pip (recommended):
pip install ctfscan
From source:
git clone https://github.com/Anuragmahipal/ctfscan.git
cd ctfscan
pip install -e .
Usage
# Find all flags recursively
ctfscan -ff secret.txt
# Decode base64
ctfscan -d64 encoded.txt
# Decode hex
ctfscan -dhex shellcode.hex
# Advanced analysis
ctfscan -scan binary_file
⚡ Usage Cheatsheet
ctfscan -ff <file_or_directory>
# 🔎 Search for flags recursively
ctfscan -d64 <file>
# 📜 Decode base64 content
ctfscan -dhex <file>
# 🧬 Decode hex data
ctfscan -scan <file>
# 🔍 Run exiftool, binwalk, and strings analysis
ctfscan -h
# 📖 Show help
💻 CTF Workflow Integration
Pair ctfscan with your favorite tools:
- Grep for flags while solving CTFs
- Decode strings on the fly
- Hex + base64 decoding directly from terminal
- Use in bash scripts and automation
- Integrate with
fzfand other terminal tools
🧠 Sample Use Cases
# Find all flags in a directory:
ctfscan -ff ./capture/
# Decode a file that's base64 encoded:
ctfscan -d64 encoded.txt
# Pipe into another tool:
ctfscan -ff target.bin | tee flags.txt
# Advanced analysis on binary:
ctfscan -scan challenges/binary_challenge
⚙️ Requirements
- Python 3.6 or higher
- Optional:
exiftool,binwalk,stringsfor advanced scanning
📦 Installation Methods
Method 1: PyPI (Recommended)
pip install ctfscan
ctfscan -h
Method 2: From Source
git clone https://github.com/Anuragmahipal/ctfscan.git
cd ctfscan
pip install -e .
ctfscan -h
Method 3: Development Install
git clone https://github.com/Anuragmahipal/ctfscan.git
cd ctfscan
pip install -e ".[dev]"
🐛 Troubleshooting
Command not found after installation?
- Ensure the pip installation location is in your PATH
- Try:
python -m ctfscan.cli -ff file.txt
Optional tools not working?
- Install:
exiftool,binwalk,strings - On Ubuntu/Debian:
sudo apt-get install exiftool binwalk - On macOS:
brew install exiftool binwalk
📝 License
MIT License - See LICENSE file for details
🤝 Contributing
Found a bug? Have a feature request?
Open an issue on GitHub
👨💻 Author
Anuragmahipal
GitHub: @Anuragmahipal
☠️ Why Use This?
Because grep is noisy. xxd is clunky. And most tools aren't built for CTF pace.
ctfscan is laser-focused, scriptable, minimal, and shell-native.
Find flags faster. Decode deeper. Hack cleaner. 🧨
📜 License
MIT — Fork it, enhance it, make it yours.
👾 Screenshot
$ ctfscan -ff memory_dump.bin
[+] Found: FLAG{real_binary_capture}
Metadata
Release files for anurag-ctfscan 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| anurag_ctfscan-1.0.1.tar.gz | 7.7 kB | Without provenance | Details for anurag_ctfscan-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| anurag_ctfscan-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for anurag_ctfscan-1.0.1-py3-none-any.whl |
Total release size: 15.0 kB
Release files / anurag_ctfscan-1.0.1.tar.gz
| Download URL | anurag_ctfscan-1.0.1.tar.gz |
|---|---|
| Size | 7.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b0e70ef034b23bf4666fd17cc15e11f92cf94e53041748a9fb85d46eecac276b
|
|
BLAKE2b-256 checksum How to use checksums |
403719b62a4ef57d07d337342795f60612f8a4507f4c7c7453af08798ac6f1ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.2
|
Release files / anurag_ctfscan-1.0.1-py3-none-any.whl
| Download URL | anurag_ctfscan-1.0.1-py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8eb1cb3e3552858978bb2a0819bbfb658445847d5209c01c019bc424a9d48a39
|
|
BLAKE2b-256 checksum How to use checksums |
500b6950c34f22f4521ba739b8daf7753216c8f6c728deea11f5de336c02a961
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.2
|
Security for anurag-ctfscan 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.