Implementation:ARCANGEL0 EVA search exploitdb
Appearance
| Knowledge Sources | |
|---|---|
| Domains | Vulnerability_Research, External_Tool_Integration |
| Last Updated | 2026-10-29 14:00 GMT |
Overview
Concrete tool for searching the local Exploit-DB via the `searchsploit` CLI subprocess, returning structured exploit references, provided by the Mitsu search module.
Description
The search_exploitdb function invokes the `searchsploit` command-line tool (part of Exploit-DB) as a subprocess to search the local exploit database. It:
- Auto-detects the binary using `shutil.which("searchsploit")`.
- Runs with JSON output (`searchsploit --json <query>`).
- Parses results from the `RESULTS_EXPLOIT` array, extracting title, EDB-ID, and path for up to 8 references.
- Handles errors gracefully — returns an error string if searchsploit is not installed, times out (20s), or returns invalid JSON.
This is an External Tool Doc — it documents how the Mitsu repo wraps an external CLI tool.
Usage
- Vulnerability search orchestration: Called by `search_vulnerabilities` for each query string.
- Standalone search: Can be called directly to search Exploit-DB.
Code Reference
Source Location
- Repository: Mitsu
- File: search/vulnerabilities.py
Signature
def search_exploitdb(
query: str,
executable: str | None = None,
prefix: tuple[str, ...] = (),
) -> tuple[list[dict[str, str]], str | None]:
Import
from mitsu.search.vulnerabilities import search_exploitdb
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| query | str | Yes | Search query string |
| executable | None | No | Path to searchsploit binary (auto-detected if None) |
| prefix | tuple[str, ...] | No | Additional CLI arguments before the query |
Outputs
| Name | Type | Description |
|---|---|---|
| returns[0] | list[dict[str, str]] | Up to 8 references with title, id, path |
| returns[1] | None | Error message or None on success |
Usage Examples
Search Exploit-DB
from mitsu.search.vulnerabilities import search_exploitdb
references, error = search_exploitdb("nginx 1.18")
if error:
print(f"Error: {error}")
else:
for ref in references:
print(f" {ref['title']} [EDB-{ref['id']}]")
Related Pages
Implements Principle
Requires Environment
Page Connections
Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment