How psantana5/vuln-scanner works
Project type and purpose
• This is an open-source, command-line vulnerability scanning tool written in Python.
• It leverages the Requests library to probe a user-supplied target URL for various web and network security issues (XSS, SQLi, directory traversal, etc.).
File structure
• Top-level:
• README.md – project documentation and usage instructions
• vuln_scanner/ – main package directory
• Inside vuln_scanner/:
• scanner.py – the only source file; implements the CLI menu, dispatches scanning routines, collects and displays results
• No submodules or multiple services—this is a single-binary tool.
README for additional insights
• Describes features (types of vulnerability scans).
• Outlines the user flow: run scanner.py → pick a category → pick a vulnerability → enter target URL → view results.
• Dependencies: Python + requests.
Main components
a. User (Operator) – the person invoking the scanner
b. CLI Interface (scanner.py menu) – handles user input, selection logic
c. Scanner Engine – core logic that maps menu selections to scan routines
d. Vulnerability Modules – discrete functions for XSS, SQLi, Directory Traversal, etc.
e. HTTP Client (Requests library) – issues HTTP requests to the target
f. Target Web Application – the external system under test
g. Reporting / Output Formatter – collects scan results, formats console output
Relationships and interactions
• User → (runs) → CLI Interface
• CLI Interface → (invokes) → Scanner Engine
• Scanner Engine → (calls) → Vulnerability Module (e.g., run_xss_scan)
• Vulnerability Module → (uses) → HTTP Client → (sends request) → Target Web Application
• Target Web Application → (returns response) → HTTP Client → Vulnerability Module
• Vulnerability Module → (reports findings) → Scanner Engine
• Scanner Engine → (forwards) → Reporting Module → (displays) → User
Architectural patterns and design principles
• Single-process, modular design: each vulnerability category is a module/function
• Clear separation of concerns:
• CLI/UI layer
• Core scanning logic
• Network interaction layer (requests)
• Reporting/output
• Dependency on external service is unidirectional (scanner → target).
Relevant technologies and libraries
• Python 3.x runtime
• requests library for HTTP interactions
• Standard library modules for CLI I/O and basic parsing