How adperem/loxs works
Project type and purpose
• This is a standalone Python-based CLI tool called “Loxs” that scans web applications for common vulnerabilities (LFI, OR, SQLi, XSS, CRLF).
• It is not a full-stack web app, but a command-line scanner that can optionally drive Selenium/ChromeDriver or direct HTTP clients (aiohttp/requests), parse responses (BeautifulSoup), match success patterns, aggregate results, and generate an HTML report.
File structure
• Top level:
• loxs.py – main entrypoint/CLI driver
• filter.sh – auxiliary shell script for post-processing/ filtering output
• payloads/ – directory containing text files of payloads by vulnerability type
• requirements.txt – lists Python dependencies (aiohttp, selenium, flask, rich, etc.)
• No separate frontend/backend directories; this is a modular CLI engine with pluggable HTTP/Selenium backends and payload store.
Key insights from README
• Multi-threaded scanning orchestrated via aiohttp or concurrent requests
• Customizable payloads and success‐pattern matching
• Optional Tor proxy integration
• HTML report generation
Main components
a. CLI Interface (loxs.py)
b. Configuration Loader (command-line args + optional YAML)
c. Payload Manager (reads payloads/*.txt)
d. Concurrency Manager (thread pool or async event loop)
e. Scanner Engine
• HTTP Client Module (aiohttp/requests)
• Browser Automation Module (Selenium + ChromeDriver)
• Tor Proxy Adapter (optional SOCKS5 client)
f. Response Parser (BeautifulSoup + regex matching)
g. Result Aggregator (in-memory data structures + optional file writer)
h. Report Generator (HTML template + file output)
i. Filter Script (filter.sh) – post-processing
j. External Targets (Web Application under test)
k. External Services (Tor Network, ChromeDriver)
Relationships and data flows
• Configuration Loader → Payload Manager & Concurrency Manager
• Concurrency Manager dispatches tasks to Scanner Engine
• Scanner Engine (choice of HTTP Client or Browser Automation) → External Target via network (optionally through Tor Proxy)
• Response flows back → Response Parser → Result Aggregator
• After scanning completes, Result Aggregator → Report Generator → HTML report file
• Optionally, Filter Script consumes Report or raw output for further filtering
Architectural patterns and design principles
• Modular pipeline: clear separation of concerns (input, scanning, parsing, reporting)
• Pluggable backends: HTTP vs. Selenium vs. Tor adapter
• Concurrency/async: high-throughput scanning
• Configuration over code: payloads and success patterns loaded at runtime