A lightweight web application vulnerability scanner. Point it at a URL, get a prioritised list of security issues with CVE references and remediation steps.
| Requirement | Details |
|---|---|
| Python | 3.8 or higher |
| OS | Linux, macOS, Windows |
| Internet | Required to reach the target URL |
| Permission | Only scan systems you own or have written permission to test |
python3 --version # must be 3.8+git clone https://github.com/SRINIVASAN55/SecureVulnScanner.git
cd SecureVulnScanner
pip install -r requirements.txtpython3 scanner.py --url https://yourtarget.com
python3 scanner.py -u http://testphp.vulnweb.com # safe public test siteCrawls the site to depth 2 and checks for the most common vulnerabilities (SQLi, XSS, open headers, TLS issues, exposed files).
# Shallow β homepage only
python3 scanner.py -u https://yourtarget.com --depth 1
# Deep β follow links up to 3 levels
python3 scanner.py -u https://yourtarget.com --depth 3
python3 scanner.py -u https://yourtarget.com -d 3# For slow servers β increase timeout
python3 scanner.py -u https://yourtarget.com --timeout 30
# For fast networks β tighten timeout
python3 scanner.py -u https://yourtarget.com -t 5python3 scanner.py -u https://yourtarget.com -d 3 -t 15| Flag | Short | Description | Default | Example |
|---|---|---|---|---|
--url |
-u |
Target URL (required) | β | -u https://example.com |
--depth |
-d |
Crawl depth | 2 |
-d 3 |
--timeout |
-t |
Request timeout in seconds | 10 |
-t 20 |
Injection flaws
- SQL injection β error-based, blind, time-based (
CWE-89) - Cross-site scripting β reflected, stored, DOM (
CWE-79) - Command injection via form fields and headers (
CWE-78) - Path traversal / local file inclusion (
CWE-22) - XXE in XML endpoints (
CWE-611)
Authentication & session
- Default credentials against login pages
- Weak session token entropy
- Missing HttpOnly / Secure cookie flags
- Exposed admin panels (
/admin,/wp-admin,/.env)
Misconfiguration
- Open HTTP methods (TRACE, PUT, DELETE)
- Missing security headers (CSP, HSTS, X-Frame-Options)
- TLS version and cipher audit
- Directory listing enabled
- Exposed
.git,.svn, backup files
SCAN RESULTS β example.com
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
[CRITICAL] SQL Injection in /search?q= (CWE-89)
Payload: ' OR 1=1--
Fix: Use parameterised queries / prepared statements
[HIGH] Stored XSS in /comments (CWE-79)
Payload: <script>alert(1)</script>
Fix: Encode output, implement Content-Security-Policy
[HIGH] Apache 2.4.49 detected (CVE-2021-41773)
Path traversal + RCE if mod_cgi enabled
Fix: Upgrade to Apache 2.4.51+
[MEDIUM] Missing HSTS header
Fix: Add Strict-Transport-Security: max-age=31536000
[LOW] Directory listing on /uploads/
Fix: Add Options -Indexes to server config
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
5 findings | 1 critical | 2 high | 1 medium | 1 low
# These sites exist specifically for vulnerability scanner testing:
python3 scanner.py -u http://testphp.vulnweb.com
python3 scanner.py -u http://webscantest.com
python3 scanner.py -u https://hackthissite.org # with accountSSLError or certificate verify failed
β Target has a bad cert. Add --timeout 30 for slow handshakes or check if the site is actually up.
Scan returns 0 findings on a site you know is vulnerable
β Increase depth: -d 3. Some vulnerabilities are on deeper pages.
Scanner is very slow
β Reduce timeout: -t 5. Or the target server is just slow.
Only scan systems you own or have explicit written permission to test. Unauthorized scanning violates computer fraud laws in most jurisdictions. The author is not responsible for misuse.