How brooklynkray/in-the-dark works
In the Dark is a guided, terminal-based reconnaissance and enumeration tool for authorised security learning. The main workflow validates and enriches a target, gathers scan choices, previews the exact Nmap command for consent, runs it, parses and displays the result, saves a JSON record, and offers per-port next-step guidance. The graph includes the DNS and environment layers that support this flow. README capabilities such as notes, findings, and reporting are described as goals or later stages; no implementation paths for them appear in the supplied tree. Some orchestration details come from README documentation because main.py was sampled only in excerpts.
Main entry points: main.py CLI orchestrator · executor.py Process execution · storage.py Scan record writer · target.py Target validation
Components 16
Guided workflow
- CLI orchestrator
main.py - Terminal presentation
cli.py - Port validation
ports.py
Scan execution
- Scan configuration
scan.py - Process execution
executor.py
Results and guidance
- XML result parser
results.py - Service guidance
guidance.py - Scan record writer
storage.py - Saved scan JSON
storage.py
Target and environment
- Target validation
target.py - DNS enrichment
dns.py - Environment checks
environment.py
Other components
- Learner
- Nmap
- Sudo
- System DNS
Connections 16
- Learner → CLI orchestrator: enters choices
- CLI orchestrator → Target validation: validates target
- Target validation → DNS enrichment: enriches target
- DNS enrichment → System DNS: resolves names
- CLI orchestrator → Environment checks: checks environment
- CLI orchestrator → Port validation: validates ports
- CLI orchestrator → Scan configuration: builds scan
- CLI orchestrator → Terminal presentation: presents preview
- CLI orchestrator → Process execution: runs approved scan
- Process execution → Nmap: executes argv
- Process execution → Sudo: authenticates
- CLI orchestrator → XML result parser: parses XML
- CLI orchestrator → Service guidance: requests guidance
- CLI orchestrator → Scan record writer: saves scan record
- Scan record writer → Saved scan JSON: writes JSON
- CLI orchestrator → Terminal presentation: displays results