Skip to content

Repository files navigation

πŸ”’ WebTester - Website Security Scanner

Python License Stars Forks Issues

A powerful website security scanner and penetration testing tool that downloads websites locally and runs 65+ security checks including WordPress vulnerabilities, SQL injection testing, XSS detection, and CSP header generation.


🎯 What This Tool Does

Feature Description
Website Downloader Downloads HTML, CSS, JS, images, PDFs locally
65+ Security Checks Comprehensive vulnerability scanning
SQL Injection Scanner Safe penetration testing with proof generation
WordPress Scanner 15+ WordPress-specific security checks
CSP Generator Auto-generate Content-Security-Policy headers
Client Reports Professional security reports for clients

πŸ”₯ Security Features

Critical Vulnerabilities Detected

  • πŸ”΄ Exposed .env files with API keys and secrets
  • πŸ”΄ Exposed .git directories with source code
  • πŸ”΄ Database files publicly accessible
  • πŸ”΄ Private keys and certificates exposed
  • πŸ”΄ Hardcoded passwords in source code

High-Risk Vulnerabilities

  • 🟠 SQL Injection (Error-based, Boolean-based, Time-based)
  • 🟠 Cross-Site Scripting (XSS)
  • 🟠 Command Injection
  • 🟠 File Inclusion (LFI/RFI)
  • 🟠 Missing security headers (CSP, HSTS, X-Frame-Options)

Medium-Risk Vulnerabilities

  • 🟑 Server information disclosure
  • 🟑 Directory listing enabled
  • 🟑 Admin panels accessible
  • 🟑 Default credentials
  • 🟑 Outdated software versions

πŸ“¦ Installation

# Clone the repository
git clone https://github.com/jackharsh0/webtester.git

# Navigate to project folder
cd webtester

# Install dependencies
pip install -r requirements.txt

πŸš€ Usage

Basic Website Scan

python webtester.py https://example.com

SQL Injection Testing

python webtester.py https://example.com --sqli

CSP Header Generation

python webtester.py https://example.com --csp

Generate CSP from Existing Scan

python webtester.py --csp-only data/example_com https://example.com

πŸ“Š Sample Output

============================================================
WEBTESTER - Website Security Scanner v2.0
============================================================

Target: https://example.com
Time: 2024-01-15 10:30:00

PHASE 1: DOWNLOADING WEBSITE
[βœ“] Downloaded: index.html (15.2 KB)
[βœ“] Total: 47 files (12.5 MB)

PHASE 2: SECURITY SCANNING
[1/65] .env files...
[2/65] Git exposure...
[3/65] Security headers...
...

SCAN RESULTS
  CRITICAL: 2
  HIGH: 5
  MEDIUM: 8
  LOW: 12
  Total Issues: 27

πŸ›‘οΈ SQL Injection Scanner

Safe Testing (No Data Modification)

The SQL injection scanner only reads data to prove vulnerabilities exist:

  • βœ… Detects SQL injection flaws
  • βœ… Collects proof (database version, name, user)
  • βœ… Generates client-ready reports
  • ❌ Does NOT delete data
  • ❌ Does NOT modify data
  • ❌ Does NOT execute harmful commands

Proof Collection

When a vulnerability is found, the scanner safely extracts:

  • Database version
  • Database name
  • Current user
  • Number of tables
  • Table names

πŸ“ Project Structure

webtester/
β”œβ”€β”€ webtester.py          # Main entry point
β”œβ”€β”€ scraper.py            # Website downloader
β”œβ”€β”€ scanner.py            # 65+ security checks
β”œβ”€β”€ sqli_scanner.py       # SQL injection testing
β”œβ”€β”€ csp_generator.py      # CSP header generator
β”œβ”€β”€ requirements.txt      # Python dependencies
β”œβ”€β”€ LICENSE               # MIT License
β”œβ”€β”€ CONTRIBUTING.md       # Contribution guidelines
└── README.md             # This file

🎯 What You Can Prove to Clients

Vulnerability What You Can Demonstrate
SQL Injection Show database access without authorization
Exposed Secrets Prove .env files are publicly accessible
Missing Headers Document security header vulnerabilities
WordPress Issues Show plugin/theme vulnerabilities
XSS Vulnerabilities Demonstrate script injection risks

πŸ“‹ Complete Security Checks (65+)

Secrets & Credentials (10 checks)

  • Exposed .env files
  • Exposed .git directories
  • Exposed .svn directories
  • Exposed config files
  • Exposed backup files
  • Exposed database files
  • Exposed private keys
  • Exposed credentials files
  • API keys in source code
  • Hardcoded passwords

Security Headers (7 checks)

  • Content-Security-Policy (CSP)
  • Strict-Transport-Security (HSTS)
  • X-Frame-Options
  • X-Content-Type-Options
  • X-XSS-Protection
  • Referrer-Policy
  • Permissions-Policy

SSL/TLS Security (5 checks)

  • SSL certificate validity
  • TLS protocol version
  • Weak cipher suites
  • HTTP to HTTPS redirect
  • Mixed content detection

Injection Vulnerabilities (7 checks)

  • SQL injection
  • XSS vulnerabilities
  • Command injection
  • Directory traversal
  • File inclusion (LFI/RFI)
  • XML External Entity (XXE)
  • Insecure deserialization

WordPress Specific (15 checks)

  • WordPress version exposure
  • XML-RPC enabled
  • readme.html exposure
  • license.txt exposure
  • debug.log exposure
  • wp-config.php backups
  • Uploads directory listing
  • wp-includes exposure
  • User enumeration
  • REST API exposure
  • Vulnerable plugins
  • File editing enabled
  • Outdated versions
  • .htaccess protection
  • WPScan fingerprinting

🀝 Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.


πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.


⚠️ Disclaimer

This tool is for authorized security testing only. Use only on websites you own or have permission to test. Unauthorized access to computer systems is illegal.


πŸ“§ Contact


🌟 Star This Repository

If you find this tool useful, please give it a ⭐ star on GitHub!


Built for the security community πŸ”’

About

Website Security Scanner - 65+ checks, SQL injection testing, CSP generation

Resources

Contributing

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages