A modular Python-based toolkit for practicing and automating common penetration testing and reconnaissance tasks. It includes utilities for web reconnaissance, network scanning, password hash cracking, and SSH testing, with tools available through an interactive CLI or as standalone scripts.
The toolkit is organized into four core functional categories across 7 dedicated tools:
| Category | Tool | Description | Key Capabilities |
|---|---|---|---|
| 🌐 Web Reconnaissance | Directory Enumerator | Discovers hidden directories and endpoints on a target web application. | Custom wordlists, optional file extensions (.php, .html, etc.), non-404 response filtering. |
| Subdomain Enumerator | Brute-forces and discovers active subdomains for a target domain. | Fast HTTP probing using wordlists. | |
| File Downloader | Utility for downloading single files or bulk assets from a URL list. | Streamed downloads for large files, error resilience, automated directory creation. | |
| 📡 Network Security | Port Scanner | Scans TCP ports on target host/IP to discover open services. | Custom port ranges, socket connection testing, automatic common service banner mapping (FTP, SSH, HTTP, HTTPS, SMB, RDP, MySQL, etc.). |
| ARP Scanner | Discovers active hosts and maps IP to MAC addresses on a local subnet. | Scapy-powered Layer 2 ARP broadcast requests, VPN interface detection and warnings. | |
| 🔐 Authentication | SSH Brute Forcer | Tests SSH credentials against a target server using dictionary attacks. | Built with Paramiko, configurable port/timeout, automated host key policy handling. |
| 🔑 Cryptography | Password Hash Cracker | Cracks cryptographic hashes using dictionary attacks. | Supports MD5, SHA-1, SHA-256, SHA-512, and any algorithm supported by hashlib. |
python-toolkit/
├── toolkit.py # Central interactive CLI menu runner
├── requirements.txt # Third-party Python dependencies
├── tools/ # Core tool modules
│ ├── auth/ # Authentication testing
│ │ └── ssh_bruteforcer.py
│ ├── crypto/ # Cryptographic attacks
│ │ └── password_hash_cracker.py
│ ├── network/ # Network scanning & discovery
│ │ ├── arp_scanner.py
│ │ └── port_scanner.py
│ └── web/ # Web reconnaissance
│ ├── directory_enumerator.py
│ ├── file_downloader.py
│ └── subdomain_enumerator.py
└── wordlists/ # Built-in sample wordlists & loader
├── common_directories.txt # Common directory & file paths
├── load_wordlist.py # Wordlist parser utility
├── numbers.txt # Number list for brute-forcing
├── subdomains.txt # Common subdomain prefixes
└── wordlist.txt # General password & token dictionary
git clone https://github.com/anahmed404/python-pentesting-toolkit.git
cd python-pentesting-toolkitOn Windows (PowerShell):
python -m venv .venv
.\.venv\Scripts\Activate.ps1(If PowerShell blocks script execution, run: Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser)
On Linux / macOS:
python3 -m venv .venv
source .venv/bin/activatepip install -r requirements.txtDependencies:
paramiko- For SSH protocol interaction and brute forcing.requests- For HTTP/HTTPS requests and web asset enumeration.scapy- For crafting and sending raw network packets (ARP scanning).
Run the main toolkit with the interactive menu:
python toolkit.py========================================
Python Pentester Toolkit
========================================
1. Directory Enumeration
2. Subdomain Enumeration
3. File Downloader
4. Port Scan
5. ARP Scan
6. SSH Brute Force
7. Password Hash Cracker
8. Exit
========================================
Follow the interactive prompts to choose a tool and enter parameters.
Each tool can also be run independently from the command line:
python tools/web/subdomain_enumerator.py example.com wordlists/subdomains.txtpython tools/web/directory_enumerator.py https://example.com wordlists/common_directories.txt# Single file download
python tools/web/file_downloader.py https://example.com/payload.bin
# Batch download from a list of URLs
python tools/web/file_downloader.py wordlists/urls.txtpython tools/network/port_scanner.py 192.168.1.10 1024Note: Raw packet creation requires administrator/root privileges.
# Linux / macOS (Root)
sudo python3 tools/network/arp_scanner.py 192.168.1.0/24 eth0
# Windows (Run PowerShell as Administrator)
python tools/network/arp_scanner.py 192.168.1.0/24 "Wi-Fi"# Default (MD5)
python tools/crypto/password_hash_cracker.py <hash> wordlists/wordlist.txt md5
# SHA-256
python tools/crypto/password_hash_cracker.py <hash> wordlists/wordlist.txt sha256python tools/auth/ssh_bruteforcer.py <target_ip> <username> wordlists/wordlist.txt 22If VS Code shows import warnings:
- Press
Ctrl + Shift + P(orCmd + Shift + Pon macOS). - Search for Python: Select Interpreter.
- Select
.\.venv\Scripts\python.exe(Windows) or./.venv/bin/python(Linux/macOS). - Reload VS Code (
Ctrl + Shift + P-> Developer: Reload Window).
This toolkit is developed strictly for educational, research, and authorized security assessment purposes.
Running security scans, brute-force attacks, or enumeration tools against systems without prior explicit written permission from the system owner is illegal and unethical. Always obtain proper authorization before testing.