A comprehensive toolkit for CTF (Capture The Flag) competitions and cybersecurity challenges
Project description
� CTFUtils
Tu arsenal definitivo para dominar CTFs
¿Cansado de googlear herramientas CTF? ¡CTFUtils tiene todo lo que necesitas!
🚀 Instalación • ⚡ Inicio Rápido • 🎯 Ejemplos • � Documentación
🎯 ¿Por qué CTFUtils?
Antes: "¿Dónde está mi script de Caesar cipher? ¿Cómo se hace LSB steganography otra vez?"
Después:
from ctfutils import *
CaesarCipher().brute_force("WKLV LV HQFUBSWHG") # ¡Boom! 💥
✅ 4 módulos completos - Crypto, Forensics, Stego, Misc
✅ 21 tests pasando - Código confiable
✅ Ejemplos reales - Casos de CTFs auténticos
✅ POO moderno - Fácil de usar y extender
🚀 Instalación Rápida
# Clona el repo
git clone https://github.com/Oxidizerhack/ctfutils.git
cd ctfutils
# Instala y listo
pip install -e .
⚡ Inicio Rápido
# Crypto: Rompe Caesar en una línea
from ctfutils.crypto.classical import CaesarCipher
cipher = CaesarCipher()
cipher.brute_force("KHOOR ZRUOG") # Encuentra "HELLO WORLD"
# Stego: Oculta mensajes como un ninja
from ctfutils.stego.text import ZeroWidthSteganography
stego = ZeroWidthSteganography()
hidden = stego.encode("public text", "FLAG{hidden}")
# Forensics: Analiza archivos sospechosos
from ctfutils.forensics.files import FileAnalyzer
analyzer = FileAnalyzer()
analyzer.get_file_signature(binary_data) # "PNG Image"
# Misc: Convierte todo a todo
from ctfutils.misc.converters import NumberConverter
conv = NumberConverter()
conv.decimal_to_binary(1337) # "10100111001"
�️ Arsenal Completo
| 🔐 Crypto | 🔍 Forensics | 🖼️ Stego | 🔧 Misc |
|---|---|---|---|
| Caesar Cipher | File Analysis | Text Hiding | Base Conversion |
| Vigenère Cipher | Memory Dumps | Image LSB | String Manipulation |
| Hash Cracking | Network Logs | Zero-Width | Encoding/Decoding |
| Modern Crypto | Binary Analysis | Audio Stego | Math Utils |
🎯 Ver todos los módulos
🔐 Crypto (ctfutils.crypto)
- classical.py:
CaesarCipher,VigenereCipher - modern.py: Base64, XOR, algoritmos modernos
- hashing.py:
HashAnalyzerpara MD5, SHA, etc.
🔍 Forensics (ctfutils.forensics)
- files.py:
FileAnalyzerpara análisis binario - memory.py:
MemoryAnalyzerpara dumps - network.py:
NetworkAnalyzerpara logs
🖼️ Stego (ctfutils.stego)
- text.py:
ZeroWidthSteganography, espacios ocultos - image.py:
ImageSteganographyLSB - audio.py: Análisis de audio
🔧 Misc (ctfutils.misc)
- converters.py:
NumberConverter,TextConverter - utils.py:
StringManipulator
🎯 Ejemplos
� Caesar Cipher Brute Force
from ctfutils.crypto.classical import CaesarCipher
# Mensaje interceptado en CTF
encrypted = "WKLV LV D VHFUHW PHVVDJH"
# Rompe el cipher automáticamente
cipher = CaesarCipher()
solutions = cipher.brute_force(encrypted)
# Encuentra "THIS IS A SECRET MESSAGE"
print(solutions[3]) # ¡Boom! 💥
🕵️ Análisis Forense Express
from ctfutils.forensics.files import FileAnalyzer
# Archivo sospechoso
mystery_file = b"\x89PNG\r\n\x1a\n...hidden_flag..."
analyzer = FileAnalyzer()
file_type = analyzer.get_file_signature(mystery_file) # "PNG Image"
strings = analyzer.extract_strings(mystery_file) # ["hidden_flag"]
🥷 Esteganografía Ninja
from ctfutils.stego.text import ZeroWidthSteganography
# Oculta un flag en texto visible
stego = ZeroWidthSteganography()
hidden_text = stego.encode("Normal text", "FLAG{invisible}")
# Nadie sospecha nada... 😏
print(hidden_text) # "Normal text" (pero con el flag oculto)
# Extrae el flag
flag = stego.decode(hidden_text) # "FLAG{invisible}"
🧪 Testing
Código confiable con 21 tests pasando:
# Corre todos los tests
python -m pytest tests/ -v
# Ver cobertura
python -m pytest tests/ --cov=ctfutils
📊 Ver results de tests
tests/test_crypto.py::test_caesar_cipher ✓
tests/test_crypto.py::test_vigenere_cipher ✓
tests/test_crypto.py::test_hash_functions ✓
tests/test_misc.py::test_number_conversions ✓
tests/test_misc.py::test_text_manipulations ✓
... (16 tests más) ✓
======================== 21 passed in 0.13s ========================
📚 Documentación
- Ejemplos Prácticos - Casos reales de CTF
- API Reference - Documentación completa
- Guías de Uso - Tutoriales paso a paso
🤝 Contribuir
¿Encontraste un bug? ¿Tienes una idea genial?
# Fork, clone, código, commit, push, PR
git clone https://github.com/Oxidizerhack/Pgr2_Practica7.git
cd ctfutils
# Haz tu magia ✨
git commit -m "feat: nueva herramienta épica"
Construido con ❤️ para la comunidad CTF
📧 Contacto • 🐛 Issues • 💡 Features
Licencia MIT - Úsalo, modifícalo, compártelo
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ctfutils-0.1.0.tar.gz.
File metadata
- Download URL: ctfutils-0.1.0.tar.gz
- Upload date:
- Size: 27.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41b157b7fa5653dbbef134c98a101b9079a065622638cd7c360af6d3b9591311
|
|
| MD5 |
2304473557016e2a694d0a5ea1117e7c
|
|
| BLAKE2b-256 |
8edbcacd325b614f98a579b24c66ec27eb4e47e3130cd8039cf96e892274fb00
|
File details
Details for the file ctfutils-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ctfutils-0.1.0-py3-none-any.whl
- Upload date:
- Size: 34.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e1fab9c0c97c7736b7ab2b4ad0011b18ddb2708f4bf98452362dfd2d1ada2f6
|
|
| MD5 |
b7c692f3148ce12b519192acf862b042
|
|
| BLAKE2b-256 |
057ccd42432ac3ac0a99d5ea6d81fa658aca386422ae19b0776e327fd0417ef6
|