File size: 4,916 Bytes
d086025 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | # OxideScanner (`oxscan`) — Usage Reference
`oxscan` is a fast port scanner with built-in exploit-database search.
> **Only scan systems you own or have explicit permission to test.**
## Command syntax
```
usage: oxscan <target> [port-options] [--json] [--scan-timeout MS] [--exploit-timeout MS] [--threads N]
```
There are **no subcommands**: the first positional argument is always the target.
- `<target>` — hostname, domain, or IP address (max 253 characters). A port range
may be entered in interactive mode (e.g. `1-2300`).
- `oxscan <target>` with no other flags starts the **interactive arrow-key
prompts** described below.
- `oxscan --help` / `-h`, or `oxscan` with no arguments at all, prints the usage
text and exits.
## Port options
| Option | Description | Default |
|--------|-------------|---------|
| `-Nk` | Scan N×1000 ports (`-1k`=1000, `-5k`=5000, `-30k`=30000) | |
| `-N` | Scan the first N ports directly (`-500`, `-65535` = all ports) | |
| `--ports N` | Scan N ports (`--ports 1000`) | |
| *(no flag)* | Scan the top 1000 ports | top 1000 |
Valid port numbers are 1–65535; the largest supported `-Nk` value is `30k`.
## Scan mode
| Option | Description |
|--------|-------------|
| *(none)* | TCP scan (default) |
| `--udp` | UDP scan |
| `--both` | TCP + UDP scan (TCP results first, then UDP) |
## Other options
| Option | Description | Default |
|--------|-------------|---------|
| `--json` | Machine-readable JSON output (suppresses the progress banner) | off |
| `--scan-timeout MS` | Connection timeout, in milliseconds | `1000` |
| `--exploit-timeout MS` | Exploit-search timeout, in milliseconds | `10000` |
| `--threads N` | Maximum concurrent connections | `200` |
| `--script CATEGORY` | Run nmap NSE scripts of a category, e.g. `vuln` | none |
| `--no-rate-limit` | Disable request rate limiting | limiting enabled |
| `--shutdown-timeout MS` | Grace period for in-flight work before exiting | `30000` |
Numeric flags (`--ports`, `--threads`, `--scan-timeout`, `--exploit-timeout`,
`--shutdown-timeout`) take their value as the next argument and are validated;
a missing or non-numeric value is reported as an error.
## Interactive mode
Prompts appear whenever standard input is a terminal and `--json` was not given.
With a bare target, `oxscan` asks:
1. **Select scan mode** — `TCP`, `UDP`, `TCP + UDP` (skipped if `--udp`, `--both`
or any other flag is present).
2. **Number of ports to scan** — preset choices, or `Custom`, which asks for
*Enter port count or range (e.g. 2300 or 1-2300)* (skipped if `-Nk`, `-N` or
`--ports` was given).
3. **Run NSE scripts?** — if yes, **Select NSE script category** is offered with an
auto-looked-up list plus `Custom (Type your own)`, which accepts a category or
filter such as `http-*`, `ssh-auth-methods`, or a glob.
The target itself is always the first command-line argument; flags given on the
command line take precedence over the corresponding prompt.
## Environment variables
Scan, rate-limiting, logging, retry and metrics behaviour can also be configured
through `OXIDE_*` variables; CLI flags win over the environment.
| Variable | Meaning | Example |
|----------|---------|---------|
| `OXIDE_THREADS` | Worker threads / connection concurrency | `8` |
| `OXIDE_SCAN_TIMEOUT` | Connection timeout (ms) | `50` |
| `OXIDE_LOG_LEVEL` | Logging level (`trace`…`error`) | `info` |
| `OXIDE_ENABLE_RATE_LIMIT` | Enable rate limiting (`true`/`false`) | `true` |
The full list with defaults is in [environment.md](environment.md).
```bash
export OXIDE_THREADS=8
export OXIDE_SCAN_TIMEOUT=50
export OXIDE_LOG_LEVEL=info
export OXIDE_ENABLE_RATE_LIMIT=true
```
## Examples
```bash
oxscan 127.0.0.1 # TCP scan top 1000 ports
oxscan example.com -1k # TCP scan top 1000 ports
oxscan example.com -5k # TCP scan top 5000 ports
oxscan example.com -500 # scan first 500 ports
oxscan example.com -65535 # scan all ports
oxscan example.com --ports 1000 # scan 1000 ports
oxscan 192.168.1.1 --json # JSON output
oxscan scanme.nmap.org --udp # UDP scan
oxscan scanme.nmap.org --both # TCP + UDP scan
oxscan scanme.nmap.org --script vuln # run NSE vulnerability scripts
oxscan target.example --threads 8 --scan-timeout 50 --exploit-timeout 5000
```
## External tools required
`oxscan` drives host tools, which must be installed and on `PATH` (checked at
startup):
- `nmap` — port scanning, service detection, OS detection, NSE scripts (`--script`)
- `ruby` — required by the exploit-search tooling
- `searchsploit` (Exploit-DB) — exploit database search; exploit paths in the
output point into the local Exploit-DB tree, e.g.
`/opt/homebrew/opt/exploitdb/share/exploitdb/exploits/php/remote/29290.c`
See [installation.md](installation.md).
|