feat: widen port enumeration across recon stages
This commit is contained in:
@@ -61,6 +61,9 @@ def scan(
|
||||
out: Path = typer.Option(Path("/data/out"), "--out", help="Output directory"),
|
||||
enable_nuclei: bool = typer.Option(False, "--enable-nuclei", help="Run nuclei (needs network/time)"),
|
||||
passive_only: bool = typer.Option(False, "--passive-only", help="Passive enumeration only"),
|
||||
ports: str | None = typer.Option(None, "--ports", help="Explicit naabu port spec, e.g. '22,80,5000' or '1-10000'. Overrides --top-ports."),
|
||||
top_ports: int = typer.Option(1000, "--top-ports", help="Scan naabu's top-N ports when --ports is unset (default 1000)."),
|
||||
full_ports: bool = typer.Option(False, "--full-ports", help="Full 1-65535 sweep (slow). Shorthand for --ports '-'."),
|
||||
rate_limit: int | None = typer.Option(None, "--rate-limit", help="Per-tool rate limit"),
|
||||
timeout: float = typer.Option(600.0, "--timeout", help="Per-tool timeout (seconds)"),
|
||||
templates_dir: str | None = typer.Option(None, "--templates-dir", help="nuclei templates cache dir"),
|
||||
@@ -71,6 +74,7 @@ def scan(
|
||||
typer.echo(AUTH_NOTICE)
|
||||
sc = Scope.load(scope)
|
||||
run_id = f"scan-{_utcnow()}"
|
||||
port_spec = "-" if full_ports else ports
|
||||
report = run_scan(
|
||||
run_id=run_id,
|
||||
target=target,
|
||||
@@ -80,6 +84,8 @@ def scan(
|
||||
rate_limit=rate_limit,
|
||||
timeout=timeout,
|
||||
templates_dir=templates_dir,
|
||||
ports=port_spec,
|
||||
top_ports=top_ports,
|
||||
)
|
||||
report.started_at = report.started_at or run_id.replace("scan-", "")
|
||||
report.finished_at = _utcnow()
|
||||
|
||||
Reference in New Issue
Block a user