Website Vulnerability Scanner Using Python (SQLi/XSS/Headers/Ports) | Tour2Tech
Home / Projects / Website Vulnerability Scanner
LIMITED OFFER
Get up to ₹1,000 OFF
Use coupon MYProject when you book via WhatsApp/Call. We don’t sell online.
Python • requests/BS4 • urllib • socket • Flask

Website Vulnerability Scanner — Crawl, Test, and Report in Minutes

Find SQL Injection, XSS, insecure headers, open ports, directory exposures, and more. Automated crawling, targeted payloads, and clean reports with risk levels and fixes.

  • Smart crawler + form/param mapper
  • SQLi/XSS payload tests with reflected checks
  • Header audit, port scan, directory check
Delivery in 3–5 days • Pan-India support
*Demo video placeholder. Replace with your link.
1. Introduction

The Website Vulnerability Scanner Using Python automates detection of common web security issues like SQL Injection, Cross-Site Scripting (XSS), insecure headers (HSTS, CSP, X-Frame-Options), open ports, and more. It crawls the target, maps forms/parameters, fires payloads, and compiles a risk-based report with remediation tips—ideal for students, ethical hackers, and small orgs.

2. Existing System vs Proposed System
Existing System
  • Manual testing is slow and niche-skilled.
  • Paid tools are pricey and complex.
  • Few lightweight, open learning tools.
Proposed System
  • Automated Python scanner for key vulns.
  • SQLi/XSS/CSRF checks + header audit.
  • Open-port probe & directory exposure.
  • Readable reports with severity & fixes.
  • Simple UI, customizable scope/depth.
3. Working
  1. Input: Enter target URL and scope/depth settings.
  2. Crawl & Map: Discover internal links, forms, and parameters.
  3. Detection:
    • SQLi & XSS payload testing with reflection/behavior checks
    • Security header & SSL/TLS review
    • Socket-based port scan (common ports)
    • Optional directory brute-force
  4. Report: Aggregate findings with severity scores.
  5. Fixes: Provide practical remediation suggestions.
4. Technology Stack
  • Language: Python
  • Libraries: requests, BeautifulSoup (bs4), urllib, socket, re, json, threading, colorama
  • Framework (optional): Flask for web UI
  • Scanning: SQLi/XSS tests, header analysis, port scan, dir brute-force*
  • Storage: SQLite3/CSV for logs & reports
  • Reports: Console, HTML, or JSON
*Optional features based on institute requirements.
5. Modules
Input & Crawler

URL scope, link discovery.

  • Robots.txt respect*
  • Param/form mapper
Vulnerability Detection

Payload tests.

  • SQLi/XSS probes
  • CSRF markers*
Port Scanner

Socket-based probe.

  • Common ports list
  • Timeouts/threading
Header Analysis

Security config check.

  • HSTS/CSP/XFO
  • Cookie flags
Report Generation

Severity + fixes.

  • HTML/JSON export
  • Evidence snippets
GUI/Web Module

Dashboard & results.

  • Flask/Tkinter UI
  • Filter & sort
*Optional and configurable.
6. Advantages
  • Automates tedious security checks.
  • Wide coverage: SQLi, XSS, headers, ports.
  • Lightweight, open, and customizable.
  • Clear, actionable reports.
  • Great for learning and quick audits.
7. Applications
  • Developer/organization website audits.
  • Cybersecurity learning & labs.
  • Pen-testing for startups/SMBs.
  • Academic research projects.
  • Early checks for new deployments.
Python Integration Sketch (Crawler + SQLi/XSS + Headers + Ports)
import requests, re, json, socket, threading
from bs4 import BeautifulSoup
from urllib.parse import urljoin, urlparse

def crawl(start, scope_host, max_pages=200):
    q, seen, forms = [start], set(), []
    urls = []
    while q and len(urls) < max_pages:
        u = q.pop(0)
        if u in seen: continue
        seen.add(u)
        try:
            r = requests.get(u, timeout=8, allow_redirects=True)
            if urlparse(r.url).hostname != scope_host: continue
            urls.append(r.url)
            soup = BeautifulSoup(r.text, "html.parser")
            # collect forms
            for f in soup.find_all("form"):
                forms.append((r.url, f))
            # enqueue links
            for a in soup.find_all("a", href=True):
                q.append(urljoin(r.url, a["href"]))
        except Exception:
            pass
    return list(set(urls)), forms

def test_sqli(url, params):
    payload = "' OR '1'='1"
    # inject payload into each param and check anomalies
    # (status code diffs, SQL error patterns, content deltas)
    # return finding with severity and evidence

def test_xss(url, form):
    marker = ""
    # submit form with marker payload in text fields
    # check if marker reflected unescaped in response

def headers_audit(resp):
    issues = []
    must = ["Content-Security-Policy","Strict-Transport-Security","X-Frame-Options","X-Content-Type-Options"]
    for h in must:
        if h not in resp.headers:
            issues.append(f"Missing {h}")
    # cookie flags, TLS checks (optional)
    return issues

def port_scan(host, ports=(80,443,21,22,25,8080,8443)):
    openp = []
    def probe(p):
        s = socket.socket(); s.settimeout(0.8)
        try:
            s.connect((host, p)); openp.append(p)
        except: pass
        finally: s.close()
    threads=[threading.Thread(target=probe, args=(p,)) for p in ports]
    [t.start() for t in threads]; [t.join() for t in threads]
    return openp

# Orchestrate:
# - crawl -> urls/forms
# - for each url: run header audit & quick payload tests
# - forms: run sqli/xss probes
# - host: run port_scan
# - aggregate -> severity & remediation -> HTML/JSON report
              
Delivery includes full Python source, configurable payload sets, scope/depth settings, Flask/Tkinter UI, HTML/JSON report templates, and college-ready documentation.
What You Get
ItemIncludedNotes
Python Source CodeCrawler + SQLi/XSS + headers + ports
Flask/Tkinter UIURL input, scope, results viewer
ReportsHTML & JSON with severity
Payload LibraryEditable test cases
Demo VideoSetup & working walkthrough
Report & PPTCollege-format templates
SupportInstallation + viva Q&A (1 month)

FAQs — Website Vulnerability Scanner

No. It uses safe, read-only payloads intended for detection, not exploitation. Always scan targets you have permission to test.

Yes. Payload dictionaries and patterns are configurable so you can extend tests easily.

It’s a teaching-audit tool, not an evasion framework. It can still surface misconfigurations and missing defenses even behind a WAF.

Want a hands-on security scanner?

Get the Website Vulnerability Scanner with code, demo, docs, and support.

WhatsApp Us Now
Shopping Cart
Scroll to Top
Open chat
Need help in Admission?
Hello! 👋 Welcome to Tour2Tech Academy!

We’re here to help you succeed in your engineering journey with:

🌟 Final Year Projects
🎯 College Admission Consultancy
📚 Career Guidance and Skill-Building Courses

How can we assist you today? Whether you need help with a project, are looking for career guidance, or want to know more about our services, we’re just a message away! 😊