Scan for open ports (uses nmap if available).
(
target: str = typer.Argument(..., help="Target IP or domain"),
ports: Optional[str] = typer.Option(None, "--ports", "-p", help="Ports to scan (e.g., '22,80,443' or '1-1000')"),
scan_type: str = typer.Option("default", "--type", "-t", help="Scan type: quick, default, full"),
verbose: bool = typer.Option(False, "--verbose", "-v"),
)
| 277 | |
| 278 | @osint_app.command("ports") |
| 279 | def osint_ports( |
| 280 | target: str = typer.Argument(..., help="Target IP or domain"), |
| 281 | ports: str | None = typer.Option(None, "--ports", "-p", help="Ports to scan (e.g., '22,80,443' or '1-1000')"), |
| 282 | scan_type: str = typer.Option("default", "--type", "-t", help="Scan type: quick, default, full"), |
| 283 | verbose: bool = typer.Option(False, "--verbose", "-v"), |
| 284 | ): |
| 285 | """Scan for open ports (uses nmap if available).""" |
| 286 | setup_logging(debug=verbose) |
| 287 | from modules.osint import PortScanner |
| 288 | |
| 289 | console.print(f"[bold]Port Scan:[/bold] {target}") |
| 290 | scanner = PortScanner(ports=ports, scan_type=scan_type) |
| 291 | result = run_async(scanner.run(Target.from_string(target))) |
| 292 | display_result(result) |
| 293 | |
| 294 | |
| 295 | @osint_app.command("tech") |
nothing calls this directly
no test coverage detected