mirror of
https://github.com/praetorian-inc/nerva.git
synced 2026-06-20 09:27:27 +00:00
Page:
CLI Reference
No results
1
CLI Reference
nsportsman edited this page 2026-01-29 20:12:34 -06:00
CLI Reference
Complete command-line reference for Nerva.
Synopsis
nerva [flags]
Target Specification
Nerva requires targets in host:port or ip:port format. It assumes ports are already open.
# Single target
nerva -t example.com:22
# Multiple targets
nerva -t example.com:22,example.com:80,example.com:443
# From file
nerva -l targets.txt
# From stdin
cat targets.txt | nerva
naabu -host example.com -silent | nerva
Flags
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--targets |
-t |
string | — | Target or comma-separated target list |
--list |
-l |
string | — | Input file containing targets (one per line) |
--output |
-o |
string | stdout | Output file path |
--json |
bool | false | Output in JSON format | |
--csv |
bool | false | Output in CSV format | |
--fast |
-f |
bool | false | Fast mode (default ports only) |
--udp |
-U |
bool | false | Run UDP plugins |
--sctp |
-S |
bool | false | Run SCTP plugins (Linux only) |
--timeout |
-w |
int | 2000 | Timeout in milliseconds |
--verbose |
-v |
bool | false | Verbose output to stderr |
--help |
-h |
Show help |
Output Formats
Default (Human-Readable)
$ nerva -t example.com:22
ssh://example.com:22
JSON
$ nerva -t example.com:22 --json
{"host":"example.com","ip":"93.184.216.34","port":22,"protocol":"ssh","transport":"tcp","metadata":{...}}
CSV
$ nerva -t example.com:22 --csv
host,ip,port,protocol,transport,tls
example.com,93.184.216.34,22,ssh,tcp,false
Examples
Basic Usage
# Fingerprint SSH
nerva -t server.example.com:22
# Fingerprint multiple services
nerva -t server.example.com:22,server.example.com:80,server.example.com:443
File Input
# Create targets file
echo "example.com:22" > targets.txt
echo "example.com:80" >> targets.txt
echo "example.com:443" >> targets.txt
# Scan from file
nerva -l targets.txt
# With JSON output to file
nerva -l targets.txt --json -o results.json
Pipeline Integration
# With Naabu
naabu -host example.com -silent | nerva --json
# With Masscan
masscan -p1-65535 10.0.0.0/24 --rate=1000 -oL - | \
awk '{print $4":"$3}' | nerva --json
# Filter specific protocols
nerva -l targets.txt --json | jq 'select(.protocol=="ssh")'
UDP Scanning
# UDP may require root privileges
sudo nerva -t example.com:53 -U
# dns://example.com:53
SCTP Scanning (Linux Only)
# Diameter over SCTP for telecom
nerva -t mme.telecom.local:3868 -S --json
Fast Mode
# Only check default port for each protocol
nerva -l large-target-list.txt --fast --json
Timeout Adjustment
# Increase timeout for slow services
nerva -t slow-server.example.com:8080 -w 5000 # 5 seconds