2021-05-24 15:39:23 +02:00
|
|
|
# Netcat
|
2021-05-03 00:08:07 +02:00
|
|
|
Manual `man nc`
|
|
|
|
|
2021-05-24 15:39:23 +02:00
|
|
|
## Port Scanning
|
2021-05-03 00:08:07 +02:00
|
|
|
scan a single port
|
|
|
|
```bash
|
|
|
|
nc -v -w 2 z 192.168.56.1 22
|
|
|
|
```
|
|
|
|
|
|
|
|
scan multiple ports
|
|
|
|
```bash
|
|
|
|
nc -v -w 2 z 192.168.56.1 22 80
|
|
|
|
```
|
|
|
|
|
|
|
|
scan range of ports
|
|
|
|
```bash
|
|
|
|
nc -v -w 2 z 192.168.56.1 20-25
|
|
|
|
```
|
|
|
|
|
2021-05-24 15:39:23 +02:00
|
|
|
## Find a Service Running on Port
|
2021-05-03 00:08:07 +02:00
|
|
|
```bash
|
|
|
|
nc -v -n 192.168.56.110 80
|
|
|
|
```
|