inspectra-cli 2.0.0__py3-none-any.whl
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.
- inspectra/__init__.py +6 -0
- inspectra/__main__.py +6 -0
- inspectra/analysis/__init__.py +1 -0
- inspectra/analysis/recommendations.py +40 -0
- inspectra/analysis/risk.py +61 -0
- inspectra/baseline.py +94 -0
- inspectra/checks/__init__.py +79 -0
- inspectra/checks/context.py +29 -0
- inspectra/checks/directories.py +126 -0
- inspectra/checks/dns.py +141 -0
- inspectra/checks/fingerprint.py +102 -0
- inspectra/checks/headers.py +90 -0
- inspectra/checks/http.py +301 -0
- inspectra/checks/ports.py +179 -0
- inspectra/checks/robots.py +120 -0
- inspectra/checks/tls.py +212 -0
- inspectra/cli.py +413 -0
- inspectra/data/directory_wordlist.txt +170 -0
- inspectra/data/fingerprints.json +156 -0
- inspectra/data/header_rules.json +77 -0
- inspectra/models.py +138 -0
- inspectra/network.py +113 -0
- inspectra/orchestrator.py +145 -0
- inspectra/py.typed +0 -0
- inspectra/redact.py +92 -0
- inspectra/replay.py +195 -0
- inspectra/report/__init__.py +1 -0
- inspectra/report/html_report.py +69 -0
- inspectra/report/json_report.py +75 -0
- inspectra/report/markdown_report.py +86 -0
- inspectra/report/sarif_report.py +136 -0
- inspectra/report/templates/report.html.j2 +145 -0
- inspectra/safety.py +217 -0
- inspectra/utils.py +116 -0
- inspectra_cli-2.0.0.dist-info/METADATA +468 -0
- inspectra_cli-2.0.0.dist-info/RECORD +39 -0
- inspectra_cli-2.0.0.dist-info/WHEEL +4 -0
- inspectra_cli-2.0.0.dist-info/entry_points.txt +3 -0
- inspectra_cli-2.0.0.dist-info/licenses/LICENSE +21 -0
inspectra/cli.py
ADDED
|
@@ -0,0 +1,413 @@
|
|
|
1
|
+
"""Command-line interface for Inspectra."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import argparse
|
|
6
|
+
import json
|
|
7
|
+
import logging
|
|
8
|
+
import sys
|
|
9
|
+
from collections.abc import Sequence
|
|
10
|
+
from pathlib import Path
|
|
11
|
+
|
|
12
|
+
from rich.console import Console
|
|
13
|
+
from rich.panel import Panel
|
|
14
|
+
from rich.table import Table
|
|
15
|
+
|
|
16
|
+
from inspectra import __version__
|
|
17
|
+
from inspectra.models import ScanResult, Severity
|
|
18
|
+
from inspectra.report import html_report, json_report, markdown_report, sarif_report
|
|
19
|
+
from inspectra.utils import TargetValidationError, format_ist, normalize_target
|
|
20
|
+
|
|
21
|
+
CONFIG_DIR = Path.home() / ".config" / "inspectra"
|
|
22
|
+
CONFIG_FILE = CONFIG_DIR / "config.json"
|
|
23
|
+
DEFAULT_OUTPUT_DIR = "inspectra-report"
|
|
24
|
+
|
|
25
|
+
CONSENT_BANNER = (
|
|
26
|
+
"[bold yellow]Inspectra[/] performs [bold]passive security assessment[/]. "
|
|
27
|
+
"Scan only systems you [bold]own[/] or are [bold]authorized[/] to test. "
|
|
28
|
+
"Unauthorized scanning may be illegal in your jurisdiction. "
|
|
29
|
+
"Inspectra observes, assesses, explains and reports — it never exploits."
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
console = Console()
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def build_parser() -> argparse.ArgumentParser:
|
|
36
|
+
"""Build the command-line argument parser."""
|
|
37
|
+
parser = argparse.ArgumentParser(
|
|
38
|
+
prog="inspectra",
|
|
39
|
+
description=(
|
|
40
|
+
"Open-source explainable security assessment framework. "
|
|
41
|
+
"Inspect. Observe. Assess. Explain. Report. Never exploit."
|
|
42
|
+
),
|
|
43
|
+
)
|
|
44
|
+
parser.add_argument("--version", action="version", version=f"inspectra {__version__}")
|
|
45
|
+
subparsers = parser.add_subparsers(dest="command", required=True)
|
|
46
|
+
|
|
47
|
+
scan = subparsers.add_parser(
|
|
48
|
+
"scan",
|
|
49
|
+
help="Run a security assessment against a target.",
|
|
50
|
+
epilog=(
|
|
51
|
+
"Examples:\n"
|
|
52
|
+
" inspectra scan example.com --yes --skip-ports --format html\n"
|
|
53
|
+
" inspectra scan 192.168.1.1 --yes --skip-ports --allow-private --authorized\n"
|
|
54
|
+
" inspectra scan google.com --yes --skip-ports --format json -o report.json\n"
|
|
55
|
+
" inspectra scan example.com --yes --skip-ports --ports 80,443,8080"
|
|
56
|
+
),
|
|
57
|
+
)
|
|
58
|
+
scan.add_argument(
|
|
59
|
+
"target",
|
|
60
|
+
help="Domain, IP address or URL to assess (e.g. example.com).",
|
|
61
|
+
)
|
|
62
|
+
scan.add_argument(
|
|
63
|
+
"--format",
|
|
64
|
+
dest="report_format",
|
|
65
|
+
default="html",
|
|
66
|
+
help="Report format(s): markdown, html, json, sarif. "
|
|
67
|
+
"Repeat or comma-separate for multiple (default: html).",
|
|
68
|
+
)
|
|
69
|
+
scan.add_argument(
|
|
70
|
+
"-o",
|
|
71
|
+
"--output",
|
|
72
|
+
dest="output_path",
|
|
73
|
+
metavar="PATH",
|
|
74
|
+
help="Write a single-format report to this exact path (requires a single format).",
|
|
75
|
+
)
|
|
76
|
+
scan.add_argument(
|
|
77
|
+
"--output-dir",
|
|
78
|
+
default=DEFAULT_OUTPUT_DIR,
|
|
79
|
+
help=f"Directory for reports (default: {DEFAULT_OUTPUT_DIR}/).",
|
|
80
|
+
)
|
|
81
|
+
scan.add_argument(
|
|
82
|
+
"--ports",
|
|
83
|
+
help="Explicit comma-separated port list for Nmap (e.g. 80,443,8080).",
|
|
84
|
+
)
|
|
85
|
+
scan.add_argument(
|
|
86
|
+
"--top-ports",
|
|
87
|
+
type=int,
|
|
88
|
+
default=1000,
|
|
89
|
+
help="Scan the N most common ports with Nmap (default: 1000).",
|
|
90
|
+
)
|
|
91
|
+
scan.add_argument(
|
|
92
|
+
"--skip-ports",
|
|
93
|
+
action="store_true",
|
|
94
|
+
help="Skip Nmap port discovery (useful when Nmap is not installed).",
|
|
95
|
+
)
|
|
96
|
+
scan.add_argument(
|
|
97
|
+
"--directories",
|
|
98
|
+
action="store_true",
|
|
99
|
+
help="Also probe a curated wordlist of common paths (rate-limited, GET-only).",
|
|
100
|
+
)
|
|
101
|
+
scan.add_argument(
|
|
102
|
+
"--directory-wordlist",
|
|
103
|
+
help="Path to a custom wordlist for --directories (one path per line, # comments allowed).",
|
|
104
|
+
)
|
|
105
|
+
scan.add_argument(
|
|
106
|
+
"--yes",
|
|
107
|
+
action="store_true",
|
|
108
|
+
help="Accept the authorization agreement without prompting.",
|
|
109
|
+
)
|
|
110
|
+
scan.add_argument(
|
|
111
|
+
"--verbose",
|
|
112
|
+
action="store_true",
|
|
113
|
+
help="Enable debug logging.",
|
|
114
|
+
)
|
|
115
|
+
scan.add_argument(
|
|
116
|
+
"--fail-on",
|
|
117
|
+
dest="fail_on",
|
|
118
|
+
default="high",
|
|
119
|
+
choices=["none", "low", "medium", "high"],
|
|
120
|
+
help=(
|
|
121
|
+
"Exit non-zero when new findings at or above this severity exist: "
|
|
122
|
+
"none|low|medium|high (default: high)."
|
|
123
|
+
),
|
|
124
|
+
)
|
|
125
|
+
scan.add_argument(
|
|
126
|
+
"--allow-private",
|
|
127
|
+
action="store_true",
|
|
128
|
+
help="Allow scanning private/loopback/local addresses (home-lab only).",
|
|
129
|
+
)
|
|
130
|
+
scan.add_argument(
|
|
131
|
+
"--authorized",
|
|
132
|
+
action="store_true",
|
|
133
|
+
help="Required with --allow-private; confirms explicit authorization.",
|
|
134
|
+
)
|
|
135
|
+
scan.add_argument(
|
|
136
|
+
"--no-redact",
|
|
137
|
+
action="store_true",
|
|
138
|
+
help="Disable secret redaction in evidence (debug only).",
|
|
139
|
+
)
|
|
140
|
+
scan.add_argument(
|
|
141
|
+
"--save-baseline",
|
|
142
|
+
dest="save_baseline",
|
|
143
|
+
metavar="PATH",
|
|
144
|
+
help="Write baseline fingerprint file to PATH after scanning.",
|
|
145
|
+
)
|
|
146
|
+
scan.add_argument(
|
|
147
|
+
"--baseline",
|
|
148
|
+
dest="baseline",
|
|
149
|
+
metavar="PATH",
|
|
150
|
+
help="Compare against a baseline file at PATH; only new findings count toward fail-on.",
|
|
151
|
+
)
|
|
152
|
+
scan.add_argument(
|
|
153
|
+
"--save-fixtures",
|
|
154
|
+
dest="save_fixtures",
|
|
155
|
+
metavar="DIR",
|
|
156
|
+
help="Record every HTTP request/response to DIR for later replay.",
|
|
157
|
+
)
|
|
158
|
+
scan.add_argument(
|
|
159
|
+
"--replay",
|
|
160
|
+
dest="replay_dir",
|
|
161
|
+
metavar="DIR",
|
|
162
|
+
help="Replay all HTTP requests from DIR fixtures (offline, no network).",
|
|
163
|
+
)
|
|
164
|
+
return parser
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
def main(argv: Sequence[str] | None = None) -> int:
|
|
168
|
+
"""CLI entry point. Returns the process exit code."""
|
|
169
|
+
args = build_parser().parse_args(argv)
|
|
170
|
+
if args.command != "scan":
|
|
171
|
+
return 2
|
|
172
|
+
|
|
173
|
+
# Validate --format values after comma-split (F5).
|
|
174
|
+
formats = [f.strip().lower() for f in args.report_format.split(",") if f.strip()]
|
|
175
|
+
valid_formats = {"markdown", "html", "json", "sarif"}
|
|
176
|
+
for fmt in formats:
|
|
177
|
+
if fmt not in valid_formats:
|
|
178
|
+
build_parser().error(f"Invalid format {fmt!r}; choose from {sorted(valid_formats)}.")
|
|
179
|
+
|
|
180
|
+
# Validate -o/--output requires a single format (F1).
|
|
181
|
+
if args.output_path and len(formats) != 1:
|
|
182
|
+
build_parser().error(
|
|
183
|
+
"-o/--output requires a single report format (no comma-separated lists)."
|
|
184
|
+
)
|
|
185
|
+
|
|
186
|
+
# Treat empty --baseline string as absent (F2).
|
|
187
|
+
if args.baseline == "":
|
|
188
|
+
args.baseline = None
|
|
189
|
+
|
|
190
|
+
# M4: --save-fixtures and --replay are mutually exclusive.
|
|
191
|
+
if args.save_fixtures and args.replay_dir:
|
|
192
|
+
build_parser().error("--save-fixtures and --replay are mutually exclusive.")
|
|
193
|
+
|
|
194
|
+
if not _confirm_authorization(args.yes):
|
|
195
|
+
console.print("[yellow]Scan cancelled: authorization not confirmed.[/]")
|
|
196
|
+
return 2
|
|
197
|
+
|
|
198
|
+
try:
|
|
199
|
+
target = normalize_target(args.target)
|
|
200
|
+
except TargetValidationError as exc:
|
|
201
|
+
print(f"Error: Invalid target: {exc}", file=sys.stderr)
|
|
202
|
+
return 2
|
|
203
|
+
if target.is_private:
|
|
204
|
+
console.print("[dim]Note: target is a private/local address — home-lab testing.[/]")
|
|
205
|
+
|
|
206
|
+
# SSRF safety validation before any network I/O (M3).
|
|
207
|
+
from inspectra.safety import SSRFError, validate_target
|
|
208
|
+
|
|
209
|
+
try:
|
|
210
|
+
validate_target(target.hostname, args.allow_private, args.authorized)
|
|
211
|
+
except SSRFError as exc:
|
|
212
|
+
print(f"Error: {exc}", file=sys.stderr)
|
|
213
|
+
return 2
|
|
214
|
+
|
|
215
|
+
# --no-redact warning to stderr (M3).
|
|
216
|
+
if args.no_redact:
|
|
217
|
+
print("Warning: redaction disabled - evidence may contain secrets.", file=sys.stderr)
|
|
218
|
+
|
|
219
|
+
# Imported lazily: keeps `inspectra --version` fast by deferring the
|
|
220
|
+
# heavy scan stack (httpx, dnspython, cryptography).
|
|
221
|
+
from inspectra.models import ScanOptions
|
|
222
|
+
from inspectra.orchestrator import ScanAborted, run_scan
|
|
223
|
+
|
|
224
|
+
options = ScanOptions(
|
|
225
|
+
output_dir=args.output_dir,
|
|
226
|
+
report_format=args.report_format,
|
|
227
|
+
ports=args.ports,
|
|
228
|
+
top_ports=args.top_ports,
|
|
229
|
+
skip_ports=args.skip_ports,
|
|
230
|
+
directories=args.directories,
|
|
231
|
+
directory_wordlist=args.directory_wordlist,
|
|
232
|
+
fail_on=args.fail_on,
|
|
233
|
+
save_baseline=args.save_baseline,
|
|
234
|
+
baseline=args.baseline,
|
|
235
|
+
output_path=args.output_path,
|
|
236
|
+
allow_private=args.allow_private,
|
|
237
|
+
authorized=args.authorized,
|
|
238
|
+
no_redact=args.no_redact,
|
|
239
|
+
save_fixtures=args.save_fixtures,
|
|
240
|
+
replay_dir=args.replay_dir,
|
|
241
|
+
)
|
|
242
|
+
output_dir = None
|
|
243
|
+
if not args.output_path:
|
|
244
|
+
output_dir = Path(args.output_dir)
|
|
245
|
+
output_dir.mkdir(parents=True, exist_ok=True)
|
|
246
|
+
_setup_logging(args.verbose, output_dir / "inspectra.log")
|
|
247
|
+
|
|
248
|
+
try:
|
|
249
|
+
with console.status(f"[bold green]Scanning[/] {target.hostname} …") as status:
|
|
250
|
+
result = run_scan(
|
|
251
|
+
target,
|
|
252
|
+
options,
|
|
253
|
+
progress=lambda name: status.update(
|
|
254
|
+
f"[bold green]Scanning[/] {target.hostname} — {name} check"
|
|
255
|
+
),
|
|
256
|
+
)
|
|
257
|
+
except ScanAborted as exc:
|
|
258
|
+
print(f"Error: Scan aborted: {exc}", file=sys.stderr)
|
|
259
|
+
return 2
|
|
260
|
+
|
|
261
|
+
# Set scope/redaction metadata from options (M3).
|
|
262
|
+
from inspectra.redact import redaction_metadata
|
|
263
|
+
from inspectra.safety import scope_metadata
|
|
264
|
+
|
|
265
|
+
result.scope = scope_metadata(args.allow_private, args.authorized)
|
|
266
|
+
result.redaction = redaction_metadata(args.no_redact)
|
|
267
|
+
|
|
268
|
+
# Write reports (F1: -o/--output writes a single format to an exact path).
|
|
269
|
+
if args.output_path:
|
|
270
|
+
output_path = Path(args.output_path)
|
|
271
|
+
output_path.parent.mkdir(parents=True, exist_ok=True)
|
|
272
|
+
fmt = formats[0]
|
|
273
|
+
if fmt == "json":
|
|
274
|
+
json_report.write(result, output_path)
|
|
275
|
+
elif fmt == "markdown":
|
|
276
|
+
markdown_report.write(result, output_path)
|
|
277
|
+
elif fmt == "html":
|
|
278
|
+
html_report.write(result, output_path)
|
|
279
|
+
elif fmt == "sarif":
|
|
280
|
+
sarif_report.write(result, output_path)
|
|
281
|
+
console.print(f"Report written to [cyan]{output_path.resolve()}[/]")
|
|
282
|
+
else:
|
|
283
|
+
output_dir = Path(args.output_dir)
|
|
284
|
+
output_dir.mkdir(parents=True, exist_ok=True)
|
|
285
|
+
_setup_logging(args.verbose, output_dir / "inspectra.log")
|
|
286
|
+
_write_reports(result, output_dir, args.report_format)
|
|
287
|
+
_print_summary(result, output_dir)
|
|
288
|
+
baseline_summary = None
|
|
289
|
+
if args.save_baseline:
|
|
290
|
+
from inspectra.baseline import save_baseline
|
|
291
|
+
|
|
292
|
+
baseline_findings = [
|
|
293
|
+
{
|
|
294
|
+
"id": f.rule_id,
|
|
295
|
+
"check": f.category,
|
|
296
|
+
"severity": f.severity.value,
|
|
297
|
+
"fingerprint": f.fingerprint,
|
|
298
|
+
}
|
|
299
|
+
for f in result.findings
|
|
300
|
+
]
|
|
301
|
+
save_baseline(target.input, baseline_findings, Path(args.save_baseline))
|
|
302
|
+
|
|
303
|
+
if args.baseline:
|
|
304
|
+
from inspectra.baseline import classify_findings, load_baseline
|
|
305
|
+
|
|
306
|
+
baseline_data = load_baseline(Path(args.baseline))
|
|
307
|
+
finding_dicts = [
|
|
308
|
+
{
|
|
309
|
+
"rule_id": f.rule_id,
|
|
310
|
+
"severity": f.severity.value,
|
|
311
|
+
"fingerprint": f.fingerprint,
|
|
312
|
+
}
|
|
313
|
+
for f in result.findings
|
|
314
|
+
]
|
|
315
|
+
baseline_summary = classify_findings(finding_dicts, baseline_data)
|
|
316
|
+
result._baseline_summary = baseline_summary
|
|
317
|
+
# Attach status back to findings for JSON output
|
|
318
|
+
for finding, fd in zip(result.findings, finding_dicts, strict=True):
|
|
319
|
+
finding._baseline_status = fd.get("_baseline_status")
|
|
320
|
+
|
|
321
|
+
if output_dir is not None:
|
|
322
|
+
_print_summary(result, output_dir)
|
|
323
|
+
|
|
324
|
+
# Exit code: --fail-on applies to all findings without baseline,
|
|
325
|
+
# only to new findings with baseline (F4).
|
|
326
|
+
from inspectra.baseline import failing_severity
|
|
327
|
+
|
|
328
|
+
if baseline_summary:
|
|
329
|
+
new_highs = sum(
|
|
330
|
+
1
|
|
331
|
+
for f in result.findings
|
|
332
|
+
if getattr(f, "_baseline_status", None) == "new"
|
|
333
|
+
and failing_severity(args.fail_on, f.severity.value)
|
|
334
|
+
)
|
|
335
|
+
return 1 if new_highs > 0 else 0
|
|
336
|
+
# No baseline: fail-on applies to all findings; none => always exit 0.
|
|
337
|
+
if args.fail_on == "none":
|
|
338
|
+
return 0
|
|
339
|
+
return (
|
|
340
|
+
1 if any(failing_severity(args.fail_on, f.severity.value) for f in result.findings) else 0
|
|
341
|
+
)
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
def _confirm_authorization(yes: bool) -> bool:
|
|
345
|
+
"""Show the authorization gate on first use; ``--yes`` skips it."""
|
|
346
|
+
if yes or _consent_on_file():
|
|
347
|
+
return True
|
|
348
|
+
console.print(Panel(CONSENT_BANNER, title="Authorization required", border_style="yellow"))
|
|
349
|
+
answer = input("Do you agree to scan only authorized targets? [y/N] ").strip().lower()
|
|
350
|
+
if answer in {"y", "yes"}:
|
|
351
|
+
_save_consent()
|
|
352
|
+
return True
|
|
353
|
+
return False
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
def _consent_on_file() -> bool:
|
|
357
|
+
try:
|
|
358
|
+
data = json.loads(CONFIG_FILE.read_text(encoding="utf-8"))
|
|
359
|
+
except (OSError, json.JSONDecodeError):
|
|
360
|
+
return False
|
|
361
|
+
return bool(data.get("authorized_use_agreed"))
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
def _save_consent() -> None:
|
|
365
|
+
CONFIG_DIR.mkdir(parents=True, exist_ok=True)
|
|
366
|
+
CONFIG_FILE.write_text(
|
|
367
|
+
json.dumps({"authorized_use_agreed": True, "version": __version__}),
|
|
368
|
+
encoding="utf-8",
|
|
369
|
+
)
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
def _setup_logging(verbose: bool, log_path: Path) -> None:
|
|
373
|
+
level = logging.DEBUG if verbose else logging.INFO
|
|
374
|
+
formatter = logging.Formatter("%(asctime)s %(levelname)s %(name)s: %(message)s")
|
|
375
|
+
file_handler = logging.FileHandler(log_path, encoding="utf-8")
|
|
376
|
+
file_handler.setLevel(level)
|
|
377
|
+
file_handler.setFormatter(formatter)
|
|
378
|
+
stderr_handler = logging.StreamHandler(sys.stderr)
|
|
379
|
+
stderr_handler.setLevel(logging.WARNING)
|
|
380
|
+
stderr_handler.setFormatter(formatter)
|
|
381
|
+
logging.basicConfig(level=level, handlers=[file_handler, stderr_handler])
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
def _write_reports(result: ScanResult, output_dir: Path, report_format: str) -> None:
|
|
385
|
+
"""Write reports in all requested formats (comma-separated or repeated).
|
|
386
|
+
|
|
387
|
+
JSON is always written; human-readable formats are written on request.
|
|
388
|
+
"""
|
|
389
|
+
formats = [f.strip().lower() for f in report_format.split(",") if f.strip()]
|
|
390
|
+
if not formats:
|
|
391
|
+
formats = ["markdown"]
|
|
392
|
+
json_report.write(result, output_dir / "report.json")
|
|
393
|
+
if "markdown" in formats:
|
|
394
|
+
markdown_report.write(result, output_dir / "report.md")
|
|
395
|
+
if "html" in formats:
|
|
396
|
+
html_report.write(result, output_dir / "report.html")
|
|
397
|
+
if "sarif" in formats:
|
|
398
|
+
sarif_report.write(result, output_dir / "report.sarif")
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
def _print_summary(result: ScanResult, output_dir: Path) -> None:
|
|
402
|
+
table = Table(title=f"Scan complete — {result.target.hostname}", show_lines=True)
|
|
403
|
+
table.add_column("Severity", style="bold")
|
|
404
|
+
table.add_column("Count")
|
|
405
|
+
for severity in (Severity.HIGH, Severity.MEDIUM, Severity.LOW, Severity.INFO):
|
|
406
|
+
table.add_row(severity.value.upper(), str(result.count_by_severity(severity)))
|
|
407
|
+
table.add_row("Posture score", f"{result.posture_score:.1f} / 100 ({result.grade})")
|
|
408
|
+
table.add_row(
|
|
409
|
+
"Completed (IST)",
|
|
410
|
+
format_ist(result.metadata.finished_at or result.metadata.started_at),
|
|
411
|
+
)
|
|
412
|
+
console.print(table)
|
|
413
|
+
console.print(f"Reports written to [cyan]{output_dir.resolve()}[/]")
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# Curated wordlist for the opt-in directory observation check (--directories).
|
|
2
|
+
# One path per line; lines starting with '#' are ignored.
|
|
3
|
+
# The check is GET-only, rate-limited (0.5s between requests) and reports
|
|
4
|
+
# only 2xx/3xx responses. Add your own paths with --directory-wordlist FILE.
|
|
5
|
+
|
|
6
|
+
# Admin & authentication
|
|
7
|
+
/admin
|
|
8
|
+
/administrator
|
|
9
|
+
/login
|
|
10
|
+
/signin
|
|
11
|
+
/signup
|
|
12
|
+
/register
|
|
13
|
+
/account
|
|
14
|
+
/profile
|
|
15
|
+
/users
|
|
16
|
+
/user
|
|
17
|
+
/password
|
|
18
|
+
/forgot-password
|
|
19
|
+
|
|
20
|
+
# APIs & documentation
|
|
21
|
+
/api
|
|
22
|
+
/api/v1
|
|
23
|
+
/api/v2
|
|
24
|
+
/graphql
|
|
25
|
+
/graphiql
|
|
26
|
+
/rest
|
|
27
|
+
/v1
|
|
28
|
+
/v2
|
|
29
|
+
/docs
|
|
30
|
+
/swagger
|
|
31
|
+
/swagger-ui
|
|
32
|
+
/swagger/index.html
|
|
33
|
+
/api-docs
|
|
34
|
+
/openapi.json
|
|
35
|
+
|
|
36
|
+
# Source control & secrets (high sensitivity)
|
|
37
|
+
/.git/
|
|
38
|
+
/.git/config
|
|
39
|
+
/.git/HEAD
|
|
40
|
+
/.env
|
|
41
|
+
/.env.local
|
|
42
|
+
/.aws/
|
|
43
|
+
/.ssh/
|
|
44
|
+
/.htpasswd
|
|
45
|
+
/composer.json
|
|
46
|
+
/package.json
|
|
47
|
+
/package-lock.json
|
|
48
|
+
/requirements.txt
|
|
49
|
+
/Dockerfile
|
|
50
|
+
/docker-compose.yml
|
|
51
|
+
/Makefile
|
|
52
|
+
/pom.xml
|
|
53
|
+
/go.mod
|
|
54
|
+
/node_modules/
|
|
55
|
+
/vendor/
|
|
56
|
+
/src/
|
|
57
|
+
/app
|
|
58
|
+
|
|
59
|
+
# Backups & data
|
|
60
|
+
/backup
|
|
61
|
+
/backups
|
|
62
|
+
/backup.zip
|
|
63
|
+
/db
|
|
64
|
+
/database
|
|
65
|
+
/dump.sql
|
|
66
|
+
/sql
|
|
67
|
+
/credentials
|
|
68
|
+
/server.crt
|
|
69
|
+
/server.key
|
|
70
|
+
/id_rsa
|
|
71
|
+
/key.pem
|
|
72
|
+
|
|
73
|
+
# Configuration & status
|
|
74
|
+
/config
|
|
75
|
+
/config.php
|
|
76
|
+
/config.json
|
|
77
|
+
/settings
|
|
78
|
+
/server-status
|
|
79
|
+
/server-info
|
|
80
|
+
/phpinfo.php
|
|
81
|
+
/php_info.php
|
|
82
|
+
/web.config
|
|
83
|
+
/actuator
|
|
84
|
+
/actuator/health
|
|
85
|
+
/actuator/env
|
|
86
|
+
/actuator/beans
|
|
87
|
+
/status
|
|
88
|
+
/health
|
|
89
|
+
/healthz
|
|
90
|
+
/ping
|
|
91
|
+
/version
|
|
92
|
+
/info
|
|
93
|
+
/metrics
|
|
94
|
+
/trace
|
|
95
|
+
|
|
96
|
+
# Management panels
|
|
97
|
+
/phpmyadmin
|
|
98
|
+
/adminer
|
|
99
|
+
/webmail
|
|
100
|
+
/mail
|
|
101
|
+
/webdav
|
|
102
|
+
/ftp
|
|
103
|
+
/vpn
|
|
104
|
+
/owa
|
|
105
|
+
/exchange
|
|
106
|
+
/cpanel
|
|
107
|
+
/jenkins
|
|
108
|
+
/console
|
|
109
|
+
/debug
|
|
110
|
+
|
|
111
|
+
# CMS & frameworks
|
|
112
|
+
/wordpress
|
|
113
|
+
/wp-admin
|
|
114
|
+
/wp-login.php
|
|
115
|
+
/wp-content/
|
|
116
|
+
/wp-includes/
|
|
117
|
+
/xmlrpc.php
|
|
118
|
+
/readme.html
|
|
119
|
+
/license.txt
|
|
120
|
+
/CHANGELOG
|
|
121
|
+
/changelog
|
|
122
|
+
/README
|
|
123
|
+
/readme
|
|
124
|
+
|
|
125
|
+
# Environments & misc
|
|
126
|
+
/test
|
|
127
|
+
/tests
|
|
128
|
+
/testing
|
|
129
|
+
/dev
|
|
130
|
+
/development
|
|
131
|
+
/staging
|
|
132
|
+
/tmp
|
|
133
|
+
/temp
|
|
134
|
+
/logs
|
|
135
|
+
/log
|
|
136
|
+
/error.log
|
|
137
|
+
/.github/
|
|
138
|
+
/.well-known/
|
|
139
|
+
/.well-known/security.txt
|
|
140
|
+
/sitemap.xml
|
|
141
|
+
/robots.txt
|
|
142
|
+
/index.html
|
|
143
|
+
/index.php
|
|
144
|
+
/home
|
|
145
|
+
/about
|
|
146
|
+
/contact
|
|
147
|
+
/privacy
|
|
148
|
+
/terms
|
|
149
|
+
/search
|
|
150
|
+
/upload
|
|
151
|
+
/uploads
|
|
152
|
+
/download
|
|
153
|
+
/downloads
|
|
154
|
+
/files
|
|
155
|
+
/file
|
|
156
|
+
/static
|
|
157
|
+
/assets
|
|
158
|
+
/images
|
|
159
|
+
/img
|
|
160
|
+
/css
|
|
161
|
+
/js
|
|
162
|
+
/fonts
|
|
163
|
+
/media
|
|
164
|
+
/public
|
|
165
|
+
/private
|
|
166
|
+
/internal
|
|
167
|
+
/intranet
|
|
168
|
+
/cgi-bin/
|
|
169
|
+
/proc/self/environ
|
|
170
|
+
/etc/passwd
|