The Complete Production SOP: How to Deploy and Run dirsearch Advanced Web Path & Endpoint Brute-Forcer in Autonomous AI Agents
Step-by-step SOP to install and run dirsearch Advanced Web Path & Endpoint Brute-Forcer in Codex, Claude Code, and Cursor. Includes verified prompts and sandbox rules.
Technical Overview & Architectural Context
Autonomous coding agents tasked with application security assessments often fail when orchestrating reconnaissance tools like dirsearch. LLMs hallucinate non-existent command-line flags, overwhelm web application firewalls (WAFs) by omitting concurrency rate limits, or inadvertently trigger IP bans on production assets. Furthermore, unstructured tool output frequently swamps the context window with thousands of 404 responses instead of filtering for actionable anomalies. The 'dirsearch Advanced Web Path & Endpoint Brute-Forcer' skill establishes deterministic operating boundaries for agents across Codex, Claude Code, Cursor, and Windsurf. By enforcing hard limits on thread concurrency (-t 30), filtering critical response codes (-i 200,301,302,403), and managing targeted extension permutations (.php, .html, .js, .json, .bak), this skill prevents denial-of-service edge cases and ensures discovered endpoints are parsed, categorized, and remediated within strict workspace permissions.
Prerequisites & Environment Requirements
Verified Search Intents & Long-Tail Queries Solved
This operational tutorial is engineered to provide deterministic solutions for these developer search queries:
Step-by-Step Execution Playbook
Local Environment Setup & SKILL.md Mounting
Create the local agent skill manifest directory and inject verified procedural rules for dirsearch.
Autonomous runtimes scan local configuration directories (`.agents/skills`, `.claude/skills`, or `.cursor/rules`) to build their tool and behavioral manifests. We mount the SKILL.md specification so the runtime can evaluate intent triggers and enforce execution constraints whenever directory fuzzing is required.
mkdir -p .agents/skills/dirsearch-web-path-bruteforce && curl -fsSL https://askills.dev/api/skills/dirsearch-web-path-bruteforce/raw -o .agents/skills/dirsearch-web-path-bruteforce/SKILL.md---
name: "dirsearch-web-path-bruteforce"
description: "Discover hidden directories, backup archives, and unlinked admin portals with dirsearch."
metadata:
author: "Maurosoria"
version: "1.0.0"
runtime_compatibility:
- "codex"
- "claude-code"
- "cursor"
- "windsurf"
triggers:
- "find hidden endpoints dirsearch"
- "brute force web directories"
- "discover backup files dirsearch"
permissions:
fs_read: true
fs_write: "workspace"
shell_exec: true
net_access: true
---
# Execution SOP
1. Target domain must be verified against authorized scope.
2. Concurrency flag must not exceed -t 30 to respect gateway boundaries.
3. Include extension checks: -e php,html,js,json,bak.
4. Persist structured output strictly to report.json or scan-results.txt in workspace root.Keep SKILL.md markdown concise; redundant natural language instructions consume token memory on every prompt parsing cycle.
Ensure directory permissions allow the workspace agent daemon read access to `.agents/skills/` or runtime indexing will silently skip the skill.
Environment Secrets & Dependency Validation
Validate local dirsearch binaries and configure authorized scope boundaries without leaking sensitive credentials.
Verify that dirsearch is accessible in the local shell environment and that authorized targets are configured using local environment variables or sanitized configuration files rather than hardcoding IP addresses or authentication cookies in chat histories.
which dirsearch || pip install dirsearch && echo 'TARGET_HOST=http://localhost:8080' > .env.recon.local#!/usr/bin/env bash
set -euo pipefail
if ! command -v dirsearch &> /dev/null; then
echo "[-] dirsearch not detected. Installing via pip..."
pip install --user dirsearch
fi
echo "[+] dirsearch version: $(dirsearch --version | head -n 1)"
echo "[+] Sandbox reconnaissance environment validated."Point dirsearch output to a file using the `--format=json -o recon-output.json` flags so agents read structured data rather than raw terminal ANSI color streams.
Ensure `.env.recon.local` and any resulting scan dumps (`*.json`, `*.txt`) are added to `.gitignore` to prevent leaking internal infrastructure metadata.
Intent Matching & Trigger Invocation
Activate the skill deterministically using mapped triggers in Codex, Claude Code, or Cursor.
Agent runtimes compare user instructions against the trigger array in the SKILL.md frontmatter. Supplying recognized phrases such as 'find hidden endpoints dirsearch' ensures the agent loads the SOP boundaries instead of running unconstrained, arbitrary shell loops.
# Example agent prompt execution via Claude Code CLI
claude "find hidden endpoints dirsearch for http://localhost:8080 adhering to safe concurrency limits"---
description: Trigger dirsearch safe reconnaissance
globs: "**/*recon*"
---
When the user requests to discover backup files or brute force web directories:
1. Limit thread concurrency to 30 (-t 30).
2. Filter response codes: -i 200,301,302,403.
3. Output results to workspace recon/ folder.Use verbatim trigger phrases from the skill definition in your instructions to ensure zero-shot matching without agent deliberation tokens.
Avoid ambiguous prompts like 'scan the site' which may trigger arbitrary vulnerability scanners instead of deterministic path discovery.
Verification, Linting & Output Quality Gate
Execute automated checks on discovered endpoints to generate remediation steps or verify route access control.
After the agent runs the path discovery routine, it must not terminate until findings are parsed into structured markdown or JSON and cross-referenced with your application's route whitelist or security policy.
test -f recon-results.json && jq '.results[] | select(.status == 200)' recon-results.json#!/usr/bin/env bash
set -euo pipefail
if [ ! -s recon-results.json ]; then
echo "[-] Verification failed: recon-results.json is missing or empty."
exit 1
fi
EXPOSED_SENSITIVE=$(jq '[.results[] | select(.path | test("\\.bak|admin|config"))] | length' recon-results.json)
if [ "$EXPOSED_SENSITIVE" -gt 0 ]; then
echo "[!] Warning: Found $EXPOSED_SENSITIVE sensitive unlinked endpoints requiring triage."
else
echo "[+] Verification passed: No exposed sensitive archives discovered."
fiRequire the agent to generate remediation headers (e.g. Nginx `location ~ \.(bak|config) { deny all; }`) automatically when anomalies are detected.
Inspect git status immediately; make sure dirsearch temporary cache files (`~/.dirsearch/logs`) are not inadvertently committed into the project repo.
Real-World Scenario: Automated Security Audit of Staging API Gateway Endpoints
“find hidden endpoints dirsearch on staging service http://127.0.0.1:8080. Look for dangling backup files (.bak) and administrative portals. Obey safe concurrency rules and save results to workspace.”
Runtime Troubleshooting & Failure Modes
Root Cause: The agent attempted to invoke outdated or hallucinated dirsearch flags, or dirsearch paused waiting for interactive user confirmation regarding wordlist selection.
Enforce non-interactive batch mode by appending `--batch` and using canonical status filter flag `-i 200,301,302,403`: `dirsearch --batch -u $TARGET -e php,bak,json -i 200,301,302,403 -t 30`Root Cause: Thread concurrency (-t) was set too high or the target rate-limiting mechanism triggered, blocking subsequent probe requests.
Lower thread pool concurrency and introduce delay jitter: `dirsearch -u $TARGET -t 5 -s 0.5 --random-agent -i 200,301,302,403`Frequently Asked Questions (dirsearch Advanced Web Path & Endpoint Brute-Forcer SOP)
Q:Can I use dirsearch Advanced Web Path & Endpoint Brute-Forcer across Codex, Claude Code, and Cursor simultaneously?
Yes. The skill conforms to the universal SKILL.md specification. Placing it inside `.agents/skills/dirsearch-web-path-bruteforce/SKILL.md` or linking it to runtime-specific rules directories allows Codex, Claude Code, Windsurf, and Cursor to execute the identical SOP.
Q:How does dirsearch Advanced Web Path & Endpoint Brute-Forcer prevent context window overflow during long agent sessions?
The skill instructs the agent to suppress standard terminal streaming and instead dump output directly to structured JSON (`--format=json -o recon-results.json`). The agent then uses programmatic filtering (`jq` or Python) to consume only valid findings, preserving context tokens.
Q:Does this skill require escalated root or container permissions?
No. The skill operates with a 98/100 security score within user-space permissions. It requires standard outbound HTTP network access to reach authorized target endpoints and workspace file writing permissions to save scan reports.
Ready to equip your autonomous agent with dirsearch Advanced Web Path & Endpoint Brute-Forcer?
Copy the complete audited SKILL.md specification or download the 1-click zip bundle directly from our verified registry.