How s0md3v/arjun works
Project Type & Purpose
• Arjun is an open-source parameter discovery tool for web applications.
• Its main purpose is to enumerate HTTP parameters using various techniques (brute-force based on large wordlists, heuristic extraction, external payloads, etc.) and support different HTTP request types (GET, POST, POST-JSON, POST-XML).
• The tool supports importing targets from various sources and exporting results in multiple formats (BurpSuite, text, JSON).
Key Components from the File Structure
• arjun/__main__.py – This serves as the entry point for execution when the tool is run.
• arjun/core/ – Contains the core business logic and supporting modules responsible for:
• Parameter discovery logic (e.g., anomaly.py, bruter.py, prompt.py)
• Configuration management (config.py)
• HTTP request handling (requester.py)
• Logging or error handling (error_handler.py)
• Exporting and importing capabilities (exporter.py and importer.py).
• arjun/plugins/ – Implements additional extraction methods from various external sources (e.g., commoncrawl.py, heuristic.py, otx.py, wayback.py, wl.py). This indicates a plugin-based architecture allowing extensibility.
• arjun/db/ – Contains wordlists and parameter dictionaries (files like large.txt, medium.txt, small.txt, special.json) which serve as the data backbone for brute-forcing parameters.
• Other files such as setup.py, .travis.yml, and CHANGELOG.md indicate packaging, continuous integration, and version tracking.
Relationships & Interactions
• The entry point (__main__.py) triggers and orchestrates the workflow.
• Core modules collaborate to process a target URL: configuration is loaded, HTTP requests are constructed by the requester, and responses are analyzed (using anomaly detection and brute-force routines).
• The plugin sub-system provides alternate or complementary methods for parameter extraction from external resources—each plugin interacts with the core discovery flow.
• Data flow from reading parameter wordlists (from the DB folder) feeds into the scanning process.
• Exporter and importer modules handle data input/output interfacing with third-party tools like BurpSuite or raw text/JSON files.
• Error handling and utility modules support logging, user feedback, and clean termination.
Architectural Patterns and Principles
• Modular Design: Separating the tool into core logic, plugins, and data sources allows independent development and easier testing.
• Extensibility: A plugin architecture lets the core functionality be extended with new extraction methods.
• Clear Separation of Concerns: Config, request handling, error management, and data export/import are encapsulated in their own modules.