1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:48:10 +00:00

nc: Add -p option

With this change we support the well-known and shorter way to
create a listener on all interfaces:

`nc -lvp 1337`

instead of:

`nc -lv 0.0.0.0 1337`
This commit is contained in:
Fabian Dellwing 2023-04-18 08:07:27 +02:00 committed by Andrew Kaster
parent eff3f52bda
commit 7cfa108fad
2 changed files with 26 additions and 4 deletions

View file

@ -5,7 +5,7 @@ nc
## Synopsis
```sh
$ nc [--length ] [--listen] [-N] [--udp] [--verbose] <target> <port>
$ nc [--length ] [--listen] [-N] [--udp] [-p port] [--verbose] [target] [port]
```
## Description
@ -18,6 +18,7 @@ Network cat: Connect to network sockets as if it were a file.
* `-l`, `--listen`: Listen instead of connecting
* `-N`: Close connection after reading stdin to the end
* `-u`, `--udp`: UDP mode
* `-p port`: Local port for remote connections
* `-v`, `--verbose`: Log everything that's happening
## Arguments