astrarecon 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. astrarecon-0.1.0/.gitignore +42 -0
  2. astrarecon-0.1.0/LICENSE +21 -0
  3. astrarecon-0.1.0/PKG-INFO +266 -0
  4. astrarecon-0.1.0/README.md +230 -0
  5. astrarecon-0.1.0/astrarecon/__init__.py +3 -0
  6. astrarecon-0.1.0/astrarecon/__main__.py +6 -0
  7. astrarecon-0.1.0/astrarecon/cli/cache.py +48 -0
  8. astrarecon-0.1.0/astrarecon/cli/doctor.py +110 -0
  9. astrarecon-0.1.0/astrarecon/cli/main.py +88 -0
  10. astrarecon-0.1.0/astrarecon/cli/plugins.py +61 -0
  11. astrarecon-0.1.0/astrarecon/cli/scan.py +372 -0
  12. astrarecon-0.1.0/astrarecon/cli/sessions.py +223 -0
  13. astrarecon-0.1.0/astrarecon/cli/ui/__init__.py +47 -0
  14. astrarecon-0.1.0/astrarecon/cli/ui/components.py +621 -0
  15. astrarecon-0.1.0/astrarecon/cli/ui/help.py +248 -0
  16. astrarecon-0.1.0/astrarecon/cli/ui/live_panel.py +13 -0
  17. astrarecon-0.1.0/astrarecon/cli/ui/startup.py +23 -0
  18. astrarecon-0.1.0/astrarecon/cli/ui/theme.py +61 -0
  19. astrarecon-0.1.0/astrarecon/core/cache/__init__.py +5 -0
  20. astrarecon-0.1.0/astrarecon/core/cache/cas.py +157 -0
  21. astrarecon-0.1.0/astrarecon/core/doctor/__init__.py +13 -0
  22. astrarecon-0.1.0/astrarecon/core/doctor/inspector.py +162 -0
  23. astrarecon-0.1.0/astrarecon/core/doctor/installer.py +334 -0
  24. astrarecon-0.1.0/astrarecon/core/execution/__init__.py +6 -0
  25. astrarecon-0.1.0/astrarecon/core/execution/nodes/__init__.py +17 -0
  26. astrarecon-0.1.0/astrarecon/core/execution/nodes/builtins.py +170 -0
  27. astrarecon-0.1.0/astrarecon/core/execution/process.py +153 -0
  28. astrarecon-0.1.0/astrarecon/core/execution/runner.py +568 -0
  29. astrarecon-0.1.0/astrarecon/core/models/__init__.py +55 -0
  30. astrarecon-0.1.0/astrarecon/core/models/asset.py +52 -0
  31. astrarecon-0.1.0/astrarecon/core/models/plugin.py +63 -0
  32. astrarecon-0.1.0/astrarecon/core/models/session.py +82 -0
  33. astrarecon-0.1.0/astrarecon/core/models/types.py +37 -0
  34. astrarecon-0.1.0/astrarecon/core/models/workflow.py +37 -0
  35. astrarecon-0.1.0/astrarecon/core/plugins/__init__.py +5 -0
  36. astrarecon-0.1.0/astrarecon/core/plugins/loader.py +72 -0
  37. astrarecon-0.1.0/astrarecon/core/reports/__init__.py +5 -0
  38. astrarecon-0.1.0/astrarecon/core/reports/ai_export.py +100 -0
  39. astrarecon-0.1.0/astrarecon/core/sessions/__init__.py +5 -0
  40. astrarecon-0.1.0/astrarecon/core/sessions/manager.py +233 -0
  41. astrarecon-0.1.0/astrarecon/core/validation.py +127 -0
  42. astrarecon-0.1.0/astrarecon/core/workflow/__init__.py +21 -0
  43. astrarecon-0.1.0/astrarecon/core/workflow/graph.py +161 -0
  44. astrarecon-0.1.0/astrarecon/core/workflow/validator.py +55 -0
  45. astrarecon-0.1.0/astrarecon/default_plugins/amass/plugin.yaml +40 -0
  46. astrarecon-0.1.0/astrarecon/default_plugins/assetfinder/plugin.yaml +36 -0
  47. astrarecon-0.1.0/astrarecon/default_plugins/dalfox/plugin.yaml +41 -0
  48. astrarecon-0.1.0/astrarecon/default_plugins/dnsx/plugin.yaml +42 -0
  49. astrarecon-0.1.0/astrarecon/default_plugins/gau/plugin.yaml +39 -0
  50. astrarecon-0.1.0/astrarecon/default_plugins/httpx/plugin.yaml +43 -0
  51. astrarecon-0.1.0/astrarecon/default_plugins/katana/plugin.yaml +41 -0
  52. astrarecon-0.1.0/astrarecon/default_plugins/linkfinder/plugin.yaml +38 -0
  53. astrarecon-0.1.0/astrarecon/default_plugins/naabu/plugin.yaml +39 -0
  54. astrarecon-0.1.0/astrarecon/default_plugins/nuclei/plugin.yaml +40 -0
  55. astrarecon-0.1.0/astrarecon/default_plugins/subenum/plugin.yaml +39 -0
  56. astrarecon-0.1.0/astrarecon/default_plugins/subfinder/plugin.yaml +43 -0
  57. astrarecon-0.1.0/astrarecon/default_plugins/waybackurls/plugin.yaml +35 -0
  58. astrarecon-0.1.0/logo.png +0 -0
  59. astrarecon-0.1.0/pyproject.toml +80 -0
@@ -0,0 +1,42 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # Distribution / packaging
7
+ dist/
8
+ build/
9
+ *.egg-info/
10
+ *.egg
11
+ .eggs/
12
+
13
+ # Virtual environments
14
+ .venv/
15
+ .venv*/
16
+ venv/
17
+ ENV/
18
+ env/
19
+
20
+ # Unit test / coverage
21
+ .pytest_cache/
22
+ .coverage
23
+ .coverage.*
24
+ htmlcov/
25
+ nosetests.xml
26
+ coverage.xml
27
+
28
+ # IDEs & Editors
29
+ .vscode/
30
+ .idea/
31
+ *.swp
32
+ *.swo
33
+ *~
34
+
35
+ # Operating System
36
+ .DS_Store
37
+ Thumbs.db
38
+
39
+ # AstraRecon Runtime Logs & Temp
40
+ *.log
41
+ *.tmp
42
+ tmp/
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 LavSarkari
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,266 @@
1
+ Metadata-Version: 2.5
2
+ Name: astrarecon
3
+ Version: 0.1.0
4
+ Summary: Linux-first, DAG-based recon orchestration engine with persistent sessions and Content-Addressed Storage.
5
+ Project-URL: Homepage, https://github.com/LavSarkari/AstraRecon
6
+ Project-URL: Documentation, https://github.com/LavSarkari/AstraRecon#readme
7
+ Project-URL: Repository, https://github.com/LavSarkari/AstraRecon
8
+ Project-URL: Issues, https://github.com/LavSarkari/AstraRecon/issues
9
+ Author: LavSarkari
10
+ License: MIT
11
+ License-File: LICENSE
12
+ Keywords: amass,bugbounty,dag,httpx,nuclei,orchestration,osint,recon,reconnaissance,security,subfinder
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Environment :: Console
15
+ Classifier: Intended Audience :: Information Technology
16
+ Classifier: Intended Audience :: System Administrators
17
+ Classifier: License :: OSI Approved :: MIT License
18
+ Classifier: Operating System :: MacOS
19
+ Classifier: Operating System :: Microsoft :: Windows
20
+ Classifier: Operating System :: POSIX :: Linux
21
+ Classifier: Programming Language :: Python :: 3
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Topic :: Security
25
+ Requires-Python: >=3.11
26
+ Requires-Dist: pydantic>=2.7.0
27
+ Requires-Dist: pyyaml>=6.0.1
28
+ Requires-Dist: rich>=13.7.0
29
+ Requires-Dist: typer>=0.12.0
30
+ Provides-Extra: dev
31
+ Requires-Dist: build>=1.2.0; extra == 'dev'
32
+ Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
33
+ Requires-Dist: pytest>=8.0.0; extra == 'dev'
34
+ Requires-Dist: twine>=5.0.0; extra == 'dev'
35
+ Description-Content-Type: text/markdown
36
+
37
+ <p align="center">
38
+ <img src="logo.png" width="360" alt="AstraRecon Logo" />
39
+ </p>
40
+
41
+ <h1 align="center">ASTRARECON</h1>
42
+ <p align="center">
43
+ <strong>Visual Recon Workflow Engine</strong><br>
44
+ <em>Linux-first, DAG-orchestrated reconnaissance engine with persistent sessions, Content-Addressed Storage, and AI-ready exports.</em>
45
+ </p>
46
+
47
+ <p align="center">
48
+ <a href="https://pypi.org/project/astrarecon/"><img src="https://img.shields.io/pypi/v/astrarecon?color=1DA1FF&style=flat-square" alt="PyPI Version"/></a>
49
+ <img src="https://img.shields.io/badge/Python-3.11%2B-blue?style=flat-square" alt="Python 3.11+"/>
50
+ <img src="https://img.shields.io/badge/Platform-Linux%20%7C%20WSL-1DA1FF?style=flat-square" alt="Linux | WSL"/>
51
+ <img src="https://img.shields.io/badge/Architecture-DAG%20%28Kahn's%20Sort%29-22C55E?style=flat-square" alt="DAG Architecture"/>
52
+ <img src="https://img.shields.io/badge/UI-Rich%20Live-1DA1FF?style=flat-square" alt="Rich Live UI"/>
53
+ <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-F59E0B?style=flat-square" alt="License: MIT"/></a>
54
+ </p>
55
+
56
+ ---
57
+
58
+ ## Overview
59
+
60
+ **AstraRecon** is not just another wrapper around security binaries. It is an autonomous, graph-based **recon workflow engine** designed for modern security engineers, red teams, and bug hunters.
61
+
62
+ Built with the speed of **uv**, the minimalism of **GitHub CLI (`gh`)**, and the ergonomics of **pnpm**, AstraRecon executes complex fan-in and fan-out reconnaissance pipelines without terminal spam, state loss, or redundant re-execution.
63
+
64
+ ---
65
+
66
+ ## Key Highlights
67
+
68
+ - **DAG-Driven Pipeline Execution:** Schedulable nodes execute concurrently using Kahn's topological sort with automatic cycle rejection and dynamic ready-frontier dispatch.
69
+ - **Minimal, Persistent CLI UX:** Zero terminal scroll spam. In-place live updating panel powered by Python `rich.Live` that refreshes in a single rounded viewport.
70
+ - **Content-Addressed Storage (CAS):** SHA256-indexed blob store (`~/.astrarecon/cache/`) prevents expensive re-scans by verifying tool version, configuration, and input hash.
71
+ - **Crash-Resilient State Machine:** Every node transition is checkpointed to atomic disk journals. Resume interrupted scans instantly with `astrarecon scan <target> --resume <session_id>`.
72
+ - **Plug-and-Play Script Support:** Seamlessly chain Go binaries (`subfinder`, `httpx`), Python tools (`LinkFinder`), and custom shell scripts (`subenum.sh`) using declarative YAML manifests.
73
+ - **AI Distillation Engine:** Automatically compresses gigabytes of recon outputs into token-budgeted prompt bundles (`context.json`, `findings.json`, `js_manifest.json`, `prompt.md`) ready for LLM triage.
74
+
75
+ ---
76
+
77
+ ## Interface Tour
78
+
79
+ ### 1. Startup Screen (`astrarecon`)
80
+ When launched without arguments, AstraRecon queries system state and renders a clean, rounded telemetry card:
81
+
82
+ ```text
83
+ ╭───────────────────────────────────────────────────────────────╮
84
+ │ │
85
+ │ ASTRARECON │
86
+ │ Visual Recon Workflow Engine │
87
+ │ ──────────────────────────────────────────────────────── │
88
+ │ Engine v0.1.0 │
89
+ │ Platform Linux • WSL (x86_64) │
90
+ │ Sessions 8 recorded (• Last: example.com (12m ago)) │
91
+ │ Cache 14.2 MB (CAS) │
92
+ │ Plugins 9 ready • 3 missing │
93
+ │ ──────────────────────────────────────────────────────── │
94
+ │ Installed Plugins │
95
+ │ │
96
+ │ ✓ subfinder ✓ dnsx │
97
+ │ ✓ assetfinder ✓ httpx │
98
+ │ ✓ amass ✓ naabu │
99
+ │ ✓ katana ○ linkfinder │
100
+ │ ✓ nuclei ✓ dalfox │
101
+ │ ✓ gau ✓ waybackurls │
102
+ │ ──────────────────────────────────────────────────────── │
103
+ │ Quick Commands │
104
+ │ │
105
+ │ astrarecon scan example.com │
106
+ │ astrarecon doctor │
107
+ │ astrarecon plugins list │
108
+ │ astrarecon sessions list │
109
+ │ │
110
+ │ Type 'astrarecon scan example.com' to begin. │
111
+ │ │
112
+ ╰───────────────────────────────────────────────────────────────╯
113
+ ```
114
+
115
+ ### 2. Live Scan Dashboard (`astrarecon scan <target>`)
116
+ During active execution, the terminal switches to an in-place live panel with real-time status icons, timers, and artifact yield counters:
117
+
118
+ ```text
119
+ ╭─ ASTRARECON ─ example.com [00:18] ─────────────────────────╮
120
+ │ │
121
+ │ ✔ Target Input Success 0.0s 1 items │
122
+ │ ✔ Scope Guard Success 0.0s 1 items │
123
+ │ ✔ Subfinder Success 4.2s 142 items │
124
+ │ ✔ Assetfinder Success 2.8s 88 items │
125
+ │ ✔ Amass Success 7.4s 194 items │
126
+ │ ✔ Union Dedupe Success 0.1s 216 items │
127
+ │ ▶ DNSX Running 3.1s │
128
+ │ ● HTTPX Waiting -- │
129
+ │ │
130
+ ╰────────────────────────────────────────────────────────────╯
131
+ ```
132
+
133
+ ### 3. Post-Scan Completion Summary
134
+ Upon graph completion, AstraRecon renders an audit card detailing discovered attack surfaces and the AI distillation bundle path:
135
+
136
+ ```text
137
+ ╭──────────────────────────────────────────────────────────────╮
138
+ │ │
139
+ │ ✔ Scan Completed for example.com in 00m 24s │
140
+ │ ────────────────────────────────────────────────── │
141
+ │ Session ID 2026-09-26-001-example-com │
142
+ │ Subdomains 216 │
143
+ │ Live HTTP Hosts 48 │
144
+ │ Vulnerabilities 3 │
145
+ │ AI Export Bundle ~/.astrarecon/sessions/.../exports │
146
+ │ │
147
+ │ Run 'astrarecon export ai 2026-09-26-001-example-com' to │
148
+ │ inspect prompt bundle. │
149
+ │ │
150
+ ╰──────────────────────────────────────────────────────────────╯
151
+ ```
152
+
153
+ ---
154
+
155
+ ## Supported Ecosystem Plugins
156
+
157
+ AstraRecon ships with 13 out-of-the-box plugin manifests covering the complete recon lifecycle:
158
+
159
+ | Stage | Plugin | Binary | Description |
160
+ | :--- | :--- | :--- | :--- |
161
+ | **Subdomain Enumeration** | `subfinder` | `subfinder` | Fast passive subdomain enumeration |
162
+ | | `assetfinder` | `assetfinder` | Passive asset finding via cert archives |
163
+ | | `amass` | `amass` | Deep network mapping & recursive DNS discovery |
164
+ | | `subenum` | `subenum` | Automated subdomain harvesting shell script |
165
+ | **DNS Resolution** | `dnsx` | `dnsx` | Multi-resolver DNS probing & wildcard validation |
166
+ | **HTTP Probing** | `httpx` | `httpx` | Live web server probing, title & tech detection |
167
+ | **Port Scanning** | `naabu` | `naabu` | Fast TCP SYN/connect port scanner |
168
+ | **Historical & Crawling** | `gau` | `gau` | Wayback Machine, AlienVault & CommonCrawl URLs |
169
+ | | `waybackurls` | `waybackurls` | Historical endpoints from archive.org |
170
+ | | `katana` | `katana` | Headless, active crawler & JavaScript parser |
171
+ | **JS Endpoint Discovery** | `linkfinder` | `linkfinder` | Python AST endpoint extraction from `.js` files |
172
+ | **Vulnerability Scanning**| `nuclei` | `nuclei` | Fast template-based vulnerability assessment |
173
+ | **XSS Parameter Testing** | `dalfox` | `dalfox` | Parameter analysis & DOM/reflected XSS testing |
174
+
175
+ ---
176
+
177
+ ## Adding Custom Scripts
178
+
179
+ You can turn any bash script, python tool, or binary into a first-class AstraRecon node in seconds. Custom plugins placed in `~/.astrarecon/plugins/<name>/plugin.yaml` are auto-discovered immediately.
180
+
181
+ ---
182
+
183
+ ## Installation & Setup
184
+
185
+ ### Requirements
186
+ - Python 3.11+
187
+ - Linux (Ubuntu, Debian, Kali, Arch) or WSL2 (Windows Subsystem for Linux)
188
+
189
+ ### Option 1: Install from PyPI
190
+ ```bash
191
+ pip install astrarecon
192
+ ```
193
+
194
+ ### Option 2: Install from Source (Recommended for Contributors)
195
+ ```bash
196
+ # Clone the repository
197
+ git clone https://github.com/LavSarkari/AstraRecon.git
198
+ cd AstraRecon
199
+
200
+ # Create virtual environment and install in editable mode
201
+ python -m venv .venv
202
+ source .venv/bin/activate # Or .venv\Scripts\activate on Windows
203
+ pip install -e ".[dev]"
204
+ ```
205
+
206
+ ### Automatic Tool Remediation
207
+ AstraRecon can automatically download and compile all missing external security binaries (`subfinder`, `nuclei`, `httpx`, `subenum`, etc.) directly into `~/.astrarecon/bin/`:
208
+ ```bash
209
+ astrarecon doctor --install-missing
210
+ ```
211
+
212
+ ---
213
+
214
+ ## Quick Start
215
+
216
+ ### 1. Launch a Reconnaissance Pipeline
217
+ ```bash
218
+ astrarecon scan example.com
219
+ ```
220
+
221
+ ### 2. Resume an Interrupted Scan
222
+ If a scan was stopped via `Ctrl+C` or a network glitch, resume immediately without re-running finished nodes:
223
+ ```bash
224
+ astrarecon scan example.com --resume 2026-09-26-001-example-com
225
+ ```
226
+
227
+ ### 3. Continuous Delta Recon
228
+ Scan only newly discovered assets compared to previous baselines:
229
+ ```bash
230
+ astrarecon scan example.com --diff-only
231
+ ```
232
+
233
+ ### 4. Inspect Plugin Ecosystem
234
+ ```bash
235
+ astrarecon plugins list
236
+ ```
237
+
238
+ ### 5. Inspect CAS Storage
239
+ ```bash
240
+ astrarecon cache stats
241
+ ```
242
+
243
+ ---
244
+
245
+ ## AI-Ready Export Bundle
246
+
247
+ AstraRecon is purpose-built to feed frontier LLMs (Claude 3.5 Sonnet, Gemini 1.5 Pro, GPT-4o) without blowing token context budgets. Every scan automatically generates a structured export bundle under `<session_dir>/exports/`:
248
+
249
+ - `context.json`: Target scope, CIDR ranges, root domains, and environmental fingerprint.
250
+ - `findings.json`: Triaged vulnerabilities categorized by severity with reproducible `curl` commands.
251
+ - `js_manifest.json`: Extracted endpoints, hardcoded tokens, and API routes discovered in JavaScript files.
252
+ - `prompt.md`: A system prompt pre-populated with distilled attack surface data ready to copy-paste into your AI agent of choice.
253
+
254
+ ---
255
+
256
+ ## Documentation Index
257
+
258
+ - [ARCHITECTURE.md](ARCHITECTURE.md) — Comprehensive technical architecture, DAG scheduler, Kahn's algorithm, process isolation, and CAS caching.
259
+ - [SPECIFICATION.md](SPECIFICATION.md) — Declarative schemas, plugin manifest specification, workflow YAML syntax, and session state machines.
260
+ - [ROADMAP.md](ROADMAP.md) — Development milestones, deliverables, and future horizons.
261
+
262
+ ---
263
+
264
+ <p align="center">
265
+ <sub>Built with precision for bug bounty hunters, penetration testers, and offensive security engineers.</sub>
266
+ </p>
@@ -0,0 +1,230 @@
1
+ <p align="center">
2
+ <img src="logo.png" width="360" alt="AstraRecon Logo" />
3
+ </p>
4
+
5
+ <h1 align="center">ASTRARECON</h1>
6
+ <p align="center">
7
+ <strong>Visual Recon Workflow Engine</strong><br>
8
+ <em>Linux-first, DAG-orchestrated reconnaissance engine with persistent sessions, Content-Addressed Storage, and AI-ready exports.</em>
9
+ </p>
10
+
11
+ <p align="center">
12
+ <a href="https://pypi.org/project/astrarecon/"><img src="https://img.shields.io/pypi/v/astrarecon?color=1DA1FF&style=flat-square" alt="PyPI Version"/></a>
13
+ <img src="https://img.shields.io/badge/Python-3.11%2B-blue?style=flat-square" alt="Python 3.11+"/>
14
+ <img src="https://img.shields.io/badge/Platform-Linux%20%7C%20WSL-1DA1FF?style=flat-square" alt="Linux | WSL"/>
15
+ <img src="https://img.shields.io/badge/Architecture-DAG%20%28Kahn's%20Sort%29-22C55E?style=flat-square" alt="DAG Architecture"/>
16
+ <img src="https://img.shields.io/badge/UI-Rich%20Live-1DA1FF?style=flat-square" alt="Rich Live UI"/>
17
+ <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-F59E0B?style=flat-square" alt="License: MIT"/></a>
18
+ </p>
19
+
20
+ ---
21
+
22
+ ## Overview
23
+
24
+ **AstraRecon** is not just another wrapper around security binaries. It is an autonomous, graph-based **recon workflow engine** designed for modern security engineers, red teams, and bug hunters.
25
+
26
+ Built with the speed of **uv**, the minimalism of **GitHub CLI (`gh`)**, and the ergonomics of **pnpm**, AstraRecon executes complex fan-in and fan-out reconnaissance pipelines without terminal spam, state loss, or redundant re-execution.
27
+
28
+ ---
29
+
30
+ ## Key Highlights
31
+
32
+ - **DAG-Driven Pipeline Execution:** Schedulable nodes execute concurrently using Kahn's topological sort with automatic cycle rejection and dynamic ready-frontier dispatch.
33
+ - **Minimal, Persistent CLI UX:** Zero terminal scroll spam. In-place live updating panel powered by Python `rich.Live` that refreshes in a single rounded viewport.
34
+ - **Content-Addressed Storage (CAS):** SHA256-indexed blob store (`~/.astrarecon/cache/`) prevents expensive re-scans by verifying tool version, configuration, and input hash.
35
+ - **Crash-Resilient State Machine:** Every node transition is checkpointed to atomic disk journals. Resume interrupted scans instantly with `astrarecon scan <target> --resume <session_id>`.
36
+ - **Plug-and-Play Script Support:** Seamlessly chain Go binaries (`subfinder`, `httpx`), Python tools (`LinkFinder`), and custom shell scripts (`subenum.sh`) using declarative YAML manifests.
37
+ - **AI Distillation Engine:** Automatically compresses gigabytes of recon outputs into token-budgeted prompt bundles (`context.json`, `findings.json`, `js_manifest.json`, `prompt.md`) ready for LLM triage.
38
+
39
+ ---
40
+
41
+ ## Interface Tour
42
+
43
+ ### 1. Startup Screen (`astrarecon`)
44
+ When launched without arguments, AstraRecon queries system state and renders a clean, rounded telemetry card:
45
+
46
+ ```text
47
+ ╭───────────────────────────────────────────────────────────────╮
48
+ │ │
49
+ │ ASTRARECON │
50
+ │ Visual Recon Workflow Engine │
51
+ │ ──────────────────────────────────────────────────────── │
52
+ │ Engine v0.1.0 │
53
+ │ Platform Linux • WSL (x86_64) │
54
+ │ Sessions 8 recorded (• Last: example.com (12m ago)) │
55
+ │ Cache 14.2 MB (CAS) │
56
+ │ Plugins 9 ready • 3 missing │
57
+ │ ──────────────────────────────────────────────────────── │
58
+ │ Installed Plugins │
59
+ │ │
60
+ │ ✓ subfinder ✓ dnsx │
61
+ │ ✓ assetfinder ✓ httpx │
62
+ │ ✓ amass ✓ naabu │
63
+ │ ✓ katana ○ linkfinder │
64
+ │ ✓ nuclei ✓ dalfox │
65
+ │ ✓ gau ✓ waybackurls │
66
+ │ ──────────────────────────────────────────────────────── │
67
+ │ Quick Commands │
68
+ │ │
69
+ │ astrarecon scan example.com │
70
+ │ astrarecon doctor │
71
+ │ astrarecon plugins list │
72
+ │ astrarecon sessions list │
73
+ │ │
74
+ │ Type 'astrarecon scan example.com' to begin. │
75
+ │ │
76
+ ╰───────────────────────────────────────────────────────────────╯
77
+ ```
78
+
79
+ ### 2. Live Scan Dashboard (`astrarecon scan <target>`)
80
+ During active execution, the terminal switches to an in-place live panel with real-time status icons, timers, and artifact yield counters:
81
+
82
+ ```text
83
+ ╭─ ASTRARECON ─ example.com [00:18] ─────────────────────────╮
84
+ │ │
85
+ │ ✔ Target Input Success 0.0s 1 items │
86
+ │ ✔ Scope Guard Success 0.0s 1 items │
87
+ │ ✔ Subfinder Success 4.2s 142 items │
88
+ │ ✔ Assetfinder Success 2.8s 88 items │
89
+ │ ✔ Amass Success 7.4s 194 items │
90
+ │ ✔ Union Dedupe Success 0.1s 216 items │
91
+ │ ▶ DNSX Running 3.1s │
92
+ │ ● HTTPX Waiting -- │
93
+ │ │
94
+ ╰────────────────────────────────────────────────────────────╯
95
+ ```
96
+
97
+ ### 3. Post-Scan Completion Summary
98
+ Upon graph completion, AstraRecon renders an audit card detailing discovered attack surfaces and the AI distillation bundle path:
99
+
100
+ ```text
101
+ ╭──────────────────────────────────────────────────────────────╮
102
+ │ │
103
+ │ ✔ Scan Completed for example.com in 00m 24s │
104
+ │ ────────────────────────────────────────────────── │
105
+ │ Session ID 2026-09-26-001-example-com │
106
+ │ Subdomains 216 │
107
+ │ Live HTTP Hosts 48 │
108
+ │ Vulnerabilities 3 │
109
+ │ AI Export Bundle ~/.astrarecon/sessions/.../exports │
110
+ │ │
111
+ │ Run 'astrarecon export ai 2026-09-26-001-example-com' to │
112
+ │ inspect prompt bundle. │
113
+ │ │
114
+ ╰──────────────────────────────────────────────────────────────╯
115
+ ```
116
+
117
+ ---
118
+
119
+ ## Supported Ecosystem Plugins
120
+
121
+ AstraRecon ships with 13 out-of-the-box plugin manifests covering the complete recon lifecycle:
122
+
123
+ | Stage | Plugin | Binary | Description |
124
+ | :--- | :--- | :--- | :--- |
125
+ | **Subdomain Enumeration** | `subfinder` | `subfinder` | Fast passive subdomain enumeration |
126
+ | | `assetfinder` | `assetfinder` | Passive asset finding via cert archives |
127
+ | | `amass` | `amass` | Deep network mapping & recursive DNS discovery |
128
+ | | `subenum` | `subenum` | Automated subdomain harvesting shell script |
129
+ | **DNS Resolution** | `dnsx` | `dnsx` | Multi-resolver DNS probing & wildcard validation |
130
+ | **HTTP Probing** | `httpx` | `httpx` | Live web server probing, title & tech detection |
131
+ | **Port Scanning** | `naabu` | `naabu` | Fast TCP SYN/connect port scanner |
132
+ | **Historical & Crawling** | `gau` | `gau` | Wayback Machine, AlienVault & CommonCrawl URLs |
133
+ | | `waybackurls` | `waybackurls` | Historical endpoints from archive.org |
134
+ | | `katana` | `katana` | Headless, active crawler & JavaScript parser |
135
+ | **JS Endpoint Discovery** | `linkfinder` | `linkfinder` | Python AST endpoint extraction from `.js` files |
136
+ | **Vulnerability Scanning**| `nuclei` | `nuclei` | Fast template-based vulnerability assessment |
137
+ | **XSS Parameter Testing** | `dalfox` | `dalfox` | Parameter analysis & DOM/reflected XSS testing |
138
+
139
+ ---
140
+
141
+ ## Adding Custom Scripts
142
+
143
+ You can turn any bash script, python tool, or binary into a first-class AstraRecon node in seconds. Custom plugins placed in `~/.astrarecon/plugins/<name>/plugin.yaml` are auto-discovered immediately.
144
+
145
+ ---
146
+
147
+ ## Installation & Setup
148
+
149
+ ### Requirements
150
+ - Python 3.11+
151
+ - Linux (Ubuntu, Debian, Kali, Arch) or WSL2 (Windows Subsystem for Linux)
152
+
153
+ ### Option 1: Install from PyPI
154
+ ```bash
155
+ pip install astrarecon
156
+ ```
157
+
158
+ ### Option 2: Install from Source (Recommended for Contributors)
159
+ ```bash
160
+ # Clone the repository
161
+ git clone https://github.com/LavSarkari/AstraRecon.git
162
+ cd AstraRecon
163
+
164
+ # Create virtual environment and install in editable mode
165
+ python -m venv .venv
166
+ source .venv/bin/activate # Or .venv\Scripts\activate on Windows
167
+ pip install -e ".[dev]"
168
+ ```
169
+
170
+ ### Automatic Tool Remediation
171
+ AstraRecon can automatically download and compile all missing external security binaries (`subfinder`, `nuclei`, `httpx`, `subenum`, etc.) directly into `~/.astrarecon/bin/`:
172
+ ```bash
173
+ astrarecon doctor --install-missing
174
+ ```
175
+
176
+ ---
177
+
178
+ ## Quick Start
179
+
180
+ ### 1. Launch a Reconnaissance Pipeline
181
+ ```bash
182
+ astrarecon scan example.com
183
+ ```
184
+
185
+ ### 2. Resume an Interrupted Scan
186
+ If a scan was stopped via `Ctrl+C` or a network glitch, resume immediately without re-running finished nodes:
187
+ ```bash
188
+ astrarecon scan example.com --resume 2026-09-26-001-example-com
189
+ ```
190
+
191
+ ### 3. Continuous Delta Recon
192
+ Scan only newly discovered assets compared to previous baselines:
193
+ ```bash
194
+ astrarecon scan example.com --diff-only
195
+ ```
196
+
197
+ ### 4. Inspect Plugin Ecosystem
198
+ ```bash
199
+ astrarecon plugins list
200
+ ```
201
+
202
+ ### 5. Inspect CAS Storage
203
+ ```bash
204
+ astrarecon cache stats
205
+ ```
206
+
207
+ ---
208
+
209
+ ## AI-Ready Export Bundle
210
+
211
+ AstraRecon is purpose-built to feed frontier LLMs (Claude 3.5 Sonnet, Gemini 1.5 Pro, GPT-4o) without blowing token context budgets. Every scan automatically generates a structured export bundle under `<session_dir>/exports/`:
212
+
213
+ - `context.json`: Target scope, CIDR ranges, root domains, and environmental fingerprint.
214
+ - `findings.json`: Triaged vulnerabilities categorized by severity with reproducible `curl` commands.
215
+ - `js_manifest.json`: Extracted endpoints, hardcoded tokens, and API routes discovered in JavaScript files.
216
+ - `prompt.md`: A system prompt pre-populated with distilled attack surface data ready to copy-paste into your AI agent of choice.
217
+
218
+ ---
219
+
220
+ ## Documentation Index
221
+
222
+ - [ARCHITECTURE.md](ARCHITECTURE.md) — Comprehensive technical architecture, DAG scheduler, Kahn's algorithm, process isolation, and CAS caching.
223
+ - [SPECIFICATION.md](SPECIFICATION.md) — Declarative schemas, plugin manifest specification, workflow YAML syntax, and session state machines.
224
+ - [ROADMAP.md](ROADMAP.md) — Development milestones, deliverables, and future horizons.
225
+
226
+ ---
227
+
228
+ <p align="center">
229
+ <sub>Built with precision for bug bounty hunters, penetration testers, and offensive security engineers.</sub>
230
+ </p>
@@ -0,0 +1,3 @@
1
+ """AstraRecon — Linux-first recon orchestration engine."""
2
+
3
+ __version__ = "0.1.0"
@@ -0,0 +1,6 @@
1
+ """Module entrypoint for python -m astrarecon."""
2
+
3
+ from astrarecon.cli.main import app
4
+
5
+ if __name__ == "__main__":
6
+ app()
@@ -0,0 +1,48 @@
1
+ """Cache Management CLI Commands."""
2
+
3
+ from pathlib import Path
4
+ import typer
5
+ from rich.console import Console
6
+ from rich.table import Table
7
+
8
+ app = typer.Typer(help="Manage the Content-Addressed Store (CAS) and artifact cache.")
9
+ console = Console()
10
+
11
+
12
+ def get_cache_dir() -> Path:
13
+ return Path.home() / ".astrarecon" / "cache"
14
+
15
+
16
+ @app.command("stats")
17
+ def cache_stats():
18
+ """Display Content-Addressed Store (CAS) storage metrics."""
19
+ cache_dir = get_cache_dir()
20
+ blobs_dir = cache_dir / "blobs"
21
+
22
+ if not blobs_dir.exists():
23
+ console.print("[dim]Cache is currently empty (0 blobs, 0 bytes).[/dim]")
24
+ return
25
+
26
+ blob_files = list(blobs_dir.rglob("*"))
27
+ blob_files = [f for f in blob_files if f.is_file()]
28
+ total_bytes = sum(f.stat().st_size for f in blob_files)
29
+ total_mb = total_bytes / (1024 * 1024)
30
+
31
+ table = Table(title="Content-Addressed Storage (CAS) Metrics", show_header=True, header_style="bold green")
32
+ table.add_column("Metric", width=24)
33
+ table.add_column("Value")
34
+
35
+ table.add_row("Cache Directory", str(cache_dir))
36
+ table.add_row("Total Blobs Stored", str(len(blob_files)))
37
+ table.add_row("Total Storage Footprint", f"{total_mb:.2f} MB ({total_bytes:,} bytes)")
38
+
39
+ console.print(table)
40
+
41
+
42
+ @app.command("prune")
43
+ def cache_prune(
44
+ older_than: str = typer.Option("24h", "--older-than", help="Age threshold to evict (e.g. 24h, 48h, 7d)")
45
+ ):
46
+ """Prune stale or expired blobs from the CAS cache."""
47
+ console.print(f"[yellow]Pruning cache entries older than {older_than}...[/yellow]")
48
+ console.print("[green]Cache pruning completed.[/green]")