Skip to content

Commit 26e4edb

Browse files
committed
fix(cli): updates license doc in cli
1 parent 5be5cf8 commit 26e4edb

File tree

1 file changed

+38
-3
lines changed

1 file changed

+38
-3
lines changed

cli/README.md

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ sudo r-lancli --json --quiet > scan_results.json
8080
### Target Specification
8181

8282
#### `--targets, -t <TARGETS>`
83+
8384
Comma-separated list of scan targets. Supports:
8485

8586
- **Individual IPs**: `192.168.1.1`
@@ -89,6 +90,7 @@ Comma-separated list of scan targets. Supports:
8990
**Default**: Uses the CIDR block of the selected network interface
9091

9192
**Examples**:
93+
9294
```bash
9395
# Single IP
9496
sudo r-lancli --targets 192.168.1.1
@@ -107,11 +109,13 @@ sudo r-lancli --targets 192.168.1.1,192.168.1.10-20,10.0.0.0/24
107109
```
108110

109111
#### `--ports, -p <PORTS>`
112+
110113
Comma-separated list of ports and port ranges to scan.
111114

112115
**Default**: `1-65535` (all ports)
113116

114117
**Examples**:
118+
115119
```bash
116120
# Common ports
117121
sudo r-lancli --ports 22,80,443
@@ -126,6 +130,7 @@ sudo r-lancli --ports 22,80,443,8000-9000,3389
126130
### Scan Options
127131

128132
#### `--arp-only`
133+
129134
Perform only ARP scanning, skipping SYN port scanning.
130135

131136
**Use case**: Quick device discovery without the time overhead of port scanning.
@@ -135,13 +140,15 @@ sudo r-lancli --arp-only --vendor --host-names
135140
```
136141

137142
#### `--vendor`
143+
138144
Enable MAC address vendor lookup to identify device manufacturers.
139145

140146
```bash
141147
sudo r-lancli --vendor
142148
```
143149

144150
#### `--host-names`
151+
145152
Enable reverse DNS lookup to resolve hostnames for discovered devices.
146153

147154
```bash
@@ -151,11 +158,13 @@ sudo r-lancli --host-names
151158
### Network Configuration
152159

153160
#### `--interface, -i <INTERFACE>`
161+
154162
Select a specific network interface for scanning.
155163

156164
**Default**: Automatically selects the default network interface
157165

158166
**Examples**:
167+
159168
```bash
160169
# Use specific interface
161170
sudo r-lancli --interface eth0
@@ -166,6 +175,7 @@ ifconfig # macOS/BSD
166175
```
167176

168177
#### `--source-port <SOURCE_PORT>`
178+
169179
Set the source port for outgoing scan packets.
170180

171181
**Default**: Automatically selects an available port
@@ -177,6 +187,7 @@ sudo r-lancli --source-port 12345
177187
### Output Options
178188

179189
#### `--json`
190+
180191
Output results in JSON format instead of human-readable tables.
181192

182193
**Use case**: Programmatic processing, integration with other tools.
@@ -186,6 +197,7 @@ sudo r-lancli --json > results.json
186197
```
187198

188199
#### `--quiet, -q`
200+
189201
Suppress progress messages, only show final results.
190202

191203
**Use case**: Cleaner output for scripting and automation.
@@ -197,6 +209,7 @@ sudo r-lancli --quiet --json
197209
### Timing and Performance
198210

199211
#### `--idle-timeout-ms <MILLISECONDS>`
212+
200213
Set the idle timeout for scan operations.
201214

202215
**Default**: `10000` (10 seconds)
@@ -214,6 +227,7 @@ sudo r-lancli --idle-timeout-ms 30000
214227
### Debugging
215228

216229
#### `--debug`
230+
217231
Enable debug logging for troubleshooting scan operations.
218232

219233
```bash
@@ -225,6 +239,7 @@ sudo r-lancli --debug
225239
### Table Format (Default)
226240

227241
**ARP Results**:
242+
228243
```
229244
+---------------+----------+-------------------+------------------------+
230245
| IP | HOSTNAME | MAC | VENDOR |
@@ -236,6 +251,7 @@ sudo r-lancli --debug
236251
```
237252

238253
**SYN Results** (with port scanning):
254+
239255
```
240256
+---------------+----------+-------------------+------------------------+-------------+
241257
| IP | HOSTNAME | MAC | VENDOR | OPEN_PORTS |
@@ -256,9 +272,9 @@ sudo r-lancli --debug
256272
"vendor": "Netgear",
257273
"is_current_host": false,
258274
"open_ports": [
259-
{"id": 22, "service": "ssh"},
260-
{"id": 80, "service": "http"},
261-
{"id": 443, "service": "https"}
275+
{ "id": 22, "service": "ssh" },
276+
{ "id": 80, "service": "http" },
277+
{ "id": 443, "service": "https" }
262278
]
263279
}
264280
]
@@ -360,6 +376,7 @@ for device in devices:
360376
**Error**: `permission denied: must run with root privileges`
361377

362378
**Solution**: Run with `sudo`:
379+
363380
```bash
364381
sudo r-lancli
365382
```
@@ -369,7 +386,9 @@ sudo r-lancli
369386
**Error**: `cannot find interface`
370387

371388
**Solutions**:
389+
372390
1. List available interfaces:
391+
373392
```bash
374393
# Linux
375394
ip link show
@@ -386,17 +405,21 @@ sudo r-lancli
386405
### No Results Found
387406

388407
**Possible causes**:
408+
389409
- Firewall blocking scan packets
390410
- Network devices configured to ignore ARP/ICMP
391411
- Incorrect network range specified
392412

393413
**Solutions**:
414+
394415
1. Increase timeout:
416+
395417
```bash
396418
sudo r-lancli --idle-timeout-ms 30000
397419
```
398420

399421
2. Use debug mode:
422+
400423
```bash
401424
sudo r-lancli --debug
402425
```
@@ -411,12 +434,15 @@ sudo r-lancli
411434
### Performance Issues
412435

413436
**For large networks**:
437+
414438
1. Use ARP-only for initial discovery:
439+
415440
```bash
416441
sudo r-lancli --arp-only
417442
```
418443

419444
2. Limit port ranges:
445+
420446
```bash
421447
sudo r-lancli --ports 1-1000
422448
```
@@ -441,6 +467,15 @@ sudo r-lancli
441467
- Corporate networks often have policies against unauthorized scanning
442468
- Always obtain proper authorization before scanning
443469

470+
## License
471+
472+
This project is dual-licensed under either of
473+
474+
- Apache License, Version 2.0 ([LICENSE-APACHE](../LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
475+
- MIT License ([LICENSE-MIT](../LICENSE-MIT) or http://opensource.org/licenses/MIT)
476+
477+
at your option.
478+
444479
## Related Tools
445480

446481
- **[r-lanlib](../lib/README.md)**: The underlying Rust library powering this CLI

0 commit comments

Comments
 (0)