A professional, production-grade CLI that unifies Nmap and SQLMap under one clean, emoji-rich, color-coded interface — built for authorized penetration testers and security engineers.
This tool automates offensive security utilities (Nmap & SQLMap). Scanning, probing, or attacking any system, network, or application that you do not own or do not have explicit, written authorization to test is illegal in most jurisdictions.
You — the operator — are solely responsible for how you use this software. The authors accept no liability for misuse or damage. Every scan session in interactive mode begins with a mandatory authorization prompt. Use it only on:
- 🎯 Systems you own
- 🎯 Lab environments (e.g.
scanme.nmap.org, DVWA, Metasploitable, OWASP Juice Shop) - 🎯 Engagements with a signed scope / rules-of-engagement document
| Category | Capabilities |
|---|---|
| 🎨 UX | Emoji-rich interactive menus, full-color terminal output (via colorama), ASCII banner |
| 🎚️ 3 Difficulty Modes | 🟢 Easy · 🟡 Medium · 🔴 Hard — tailored to beginners through advanced experts |
| 🖥️ Dual Interface | Fully interactive menu and direct non-interactive CLI (argparse subcommands) |
| 🌐 Nmap Module | Host discovery, SYN/Connect/ACK/UDP scans, OS & version detection, aggressive scan, NSE scripts, port specification, timing templates, multi-format output export |
| 💉 SQLMap Module | URL & request-file targets, technique selection (BEUSTQ), tamper scripts, DB/table/dump enumeration, cookie & User-Agent spoofing, Tor routing, risk/level tuning, batch mode |
| ⏱️ Operational | Per-scan timer, persistent scan-history logging, robust error handling, graceful Ctrl+C subprocess termination |
| 📦 Packaging | Installable system-wide via pip install .; registers the secscan & security-automator commands; auto-installs dependencies |
The wrapper orchestrates two external binaries that must be installed separately and available on your PATH:
# Debian / Ubuntu / Kali
sudo apt update && sudo apt install -y nmap sqlmap
# Fedora / RHEL
sudo dnf install -y nmap sqlmap
# Arch
sudo pacman -S nmap sqlmap
# macOS (Homebrew)
brew install nmap sqlmap💡 The tool shows a live Environment status panel on the main menu and will politely refuse to launch a scan if the required binary is missing — with install hints for your platform.
Clone the repository (or unzip the delivered archive), then from the project root:
# Option A — classic setuptools
pip install .
# Option B — editable/development install
pip install -e .
# Option C — build a wheel and install it
pip install build
python -m build
pip install dist/security_scan_automator-1.0.0-py3-none-any.whlcolorama is pulled in automatically. After installation, two global commands are available:
secscan # primary command
security-automator # aliaspip install colorama
python main.pyJust run the command with no arguments — the colorful menu takes over:
secscan# Nmap: quick service scan
secscan --yes nmap --target scanme.nmap.org --service-version --timing 4
# Nmap: full power, raw flags passthrough
secscan --yes nmap --nmap-args "-sS -sV -O -A -p- --script vuln -T4"
# SQLMap: enumerate databases on a lab target
secscan --yes sqlmap --url "http://localhost/vuln.php?id=1" --dbs --batch
# SQLMap: advanced, with tamper + technique + risk/level
secscan --yes sqlmap --url "http://localhost/vuln.php?id=1" \
--level 5 --risk 3 --technique BEUSTQ \
--tamper space2comment --dump --batch
# View your scan history
secscan history🔐 The
--yesflag skips the interactive authorization prompt for automated/CI contexts. Omit it to be prompted for confirmation.
The interactive interface splits every module into three experience tiers so the tool is approachable for newcomers yet uncompromising for experts.
Zero cognitive overhead. The tool asks only for a target (IP/URL) and runs battle-tested, fast default profiles.
- Nmap: fast ping discovery (
-sn), fast top-1000 TCP (-F), or quick version scan (-F -sV). - SQLMap: basic injection detection with
--batchauto-confirmation, optional--dbs.
Guided customization through friendly prompts.
- Nmap: pick scan technique (SYN/Connect/UDP), port ranges, version detection (
-sV), OS detection (-O), default scripts (-sC), timing template, and output export format (TXT/XML/all). - SQLMap: URL or request-file targets,
--level&--risktuning, DB/table/user enumeration, cookie & User-Agent spoofing, optional Tor routing.
No guardrails. You type the raw, native flags for Nmap or SQLMap and the tool executes them verbatim. Every original argument of both tools is at your fingertips — nothing is filtered or restricted.
- Nmap example:
-sS -sV -O -A -p- --script vuln -T4 --reason - SQLMap example:
-u "http://t/v.php?id=1" --level 5 --risk 3 --technique BEUSTQ --tamper space2comment --dump-all --batch
A simulated walkthrough of launching an Nmap Easy-Mode scan:
_____ ______ _____ _____ _____ _ _
/ ____| ____/ ____| / ____/ ____| /\ | \ | |
| (___ | |__ | | | (___| | / \ | \| |
\___ \| __|| | \___ \ | / /\ \ | . ` |
____) | |___| |____ ____) | |____ / ____ \| |\ |
|_____/|______\_____| |_____/\_____/_/ \_\_| \_|
Security-Scan-Automator v1.0.0 Nmap + SQLMap Orchestrator
For authorized security testing only.
========= MAIN MENU =========
Environment status:
Nmap: installed
SQLMap: installed
[1] Nmap - Network discovery and port scanning
[2] SQLMap - SQL injection detection and exploitation
[3] View scan history
[4] Show legal disclaimer
[0] Exit
Select an option: 1
======================================================================
WARNING: This tool automates Nmap and SQLMap. Scanning or attacking
systems without explicit written authorization is illegal...
======================================================================
Do you confirm you are authorized to scan the target? (yes/no): yes
----- NMAP MODULE -----
[1] Easy Mode
[2] Medium Mode
[3] Hard Mode
[0] Back to main menu
Select an option: 1
=== Nmap Easy Mode (Beginner Friendly) ===
Enter target IP or hostname: scanme.nmap.org
Choose a quick profile:
1) Fast ping discovery (-sn)
2) Fast top-1000 TCP scan (-F)
3) Quick scan with service versions (-F -sV)
Select profile [1-3] (default 2): 3
[*] Executing: nmap -F -sV scanme.nmap.org
[*] Press Ctrl+C to abort the running scan.
... live Nmap output streams here ...
[+] Scan completed successfully in 23s.
| Feature | How it is exposed |
|---|---|
| Host discovery | Easy profile -sn / any flag in Hard mode |
| TCP SYN scan | Medium technique menu (-sS) |
| TCP connect scan | Medium technique menu (-sT) |
| UDP scan | Medium technique menu (-sU) |
| ACK / Window / custom | Hard mode raw flags |
| Version detection | -sV (Medium toggle / CLI --service-version) |
| OS detection | -O (Medium toggle / CLI --os-detection) |
| Aggressive scan | -A (CLI --aggressive / Hard mode) |
| Script engine (NSE) | -sC, --script ... (Medium / Hard) |
| Port specification | -p, -p- (Medium prompt / CLI --ports) |
| Timing templates | -T0..-T5 (Medium / CLI --timing) |
| Output export | -oN / -oX / -oA (Medium output menu) |
| Feature | How it is exposed |
|---|---|
| URL target | -u (Easy/Medium / CLI --url) |
| Request-file target | -r (Medium / CLI --request-file) |
| Technique selection | --technique BEUSTQ (CLI / Hard mode) |
| Tamper scripts | --tamper (CLI / Hard mode) |
| Database enumeration | --dbs (all tiers) |
| Table enumeration | --tables (Medium / CLI) |
| Data dump | --dump, --dump-all (CLI / Hard mode) |
| Current user/db | --current-user (Medium toggle) |
| Cookie spoofing | --cookie (Medium prompt) |
| User-Agent spoofing | --user-agent (Medium prompt) |
| Tor routing | --tor --tor-type=SOCKS5 --check-tor (Medium toggle / CLI --tor) |
| Risk & Level | --risk 1-3, --level 1-5 (Medium / CLI) |
| Batch auto-confirm | --batch (all tiers) |
Every executed scan — successful, failed, or interrupted — is appended to a persistent log:
~/.security_scan_automator/scan_history.log
Each entry records the timestamp, tool, target, final status, elapsed duration, and the exact command that was run. View the most recent entries any time with:
secscan history…or via main-menu option [3].
security-scan-automator/
├── main.py # Standalone entry point (full logic, zero comments, all English)
├── security_scan_automator/
│ ├── __init__.py # Package metadata
│ └── main.py # Installed package module (console-script target)
├── setup.py # setuptools install config + command registration
├── pyproject.toml # PEP 517/621 build configuration
├── requirements.txt # Runtime dependency pin (colorama)
├── MANIFEST.in # Packaging manifest
├── LICENSE # MIT License
└── README.md # This document
- Subprocess safety: external tools are invoked via
subprocess.Popenwith an argument list (nevershell=True), eliminating shell-injection risk. User free-text flags are parsed withshlex.split. - Graceful interrupts:
Ctrl+Cduring a running scan is caught, the child process is sentSIGINT(then escalated toterminate/killif needed), and the session returns cleanly to the menu. - Missing-tool detection:
shutil.whichverifies each binary before execution, with platform-specific install guidance when absent. - Dependency resilience: if
coloramais unavailable, the tool transparently falls back to plain (uncolored) output instead of crashing. - Authorization gate: interactive scans require explicit user confirmation before any offensive action.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes
- Open a Pull Request
Distributed under the MIT License. See LICENSE for full text.
Built for ethical hackers. Use responsibly. Stay in scope. 🎯