mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:57:45 +00:00
nc: Sort command line arguments alphabetically
This commit is contained in:
parent
f61947fa9e
commit
552e317a89
2 changed files with 9 additions and 9 deletions
|
@ -5,7 +5,7 @@ nc
|
||||||
## Synopsis
|
## Synopsis
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ nc [--listen] [--verbose] [--udp] [-N] [--length ] <target> <port>
|
$ nc [--length ] [--listen] [-N] [--udp] [--verbose] <target> <port>
|
||||||
```
|
```
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
@ -14,11 +14,11 @@ Network cat: Connect to network sockets as if it were a file.
|
||||||
|
|
||||||
## Options
|
## Options
|
||||||
|
|
||||||
* `-l`, `--listen`: Listen instead of connecting
|
|
||||||
* `-v`, `--verbose`: Log everything that's happening
|
|
||||||
* `-u`, `--udp`: UDP mode
|
|
||||||
* `-N`: Close connection after reading stdin to the end
|
|
||||||
* `-I`, `--length`: Set maximum tcp receive buffer size
|
* `-I`, `--length`: Set maximum tcp receive buffer size
|
||||||
|
* `-l`, `--listen`: Listen instead of connecting
|
||||||
|
* `-N`: Close connection after reading stdin to the end
|
||||||
|
* `-u`, `--udp`: UDP mode
|
||||||
|
* `-v`, `--verbose`: Log everything that's happening
|
||||||
|
|
||||||
## Arguments
|
## Arguments
|
||||||
|
|
||||||
|
|
|
@ -55,11 +55,11 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
|
|
||||||
Core::ArgsParser args_parser;
|
Core::ArgsParser args_parser;
|
||||||
args_parser.set_general_help("Network cat: Connect to network sockets as if it were a file.");
|
args_parser.set_general_help("Network cat: Connect to network sockets as if it were a file.");
|
||||||
args_parser.add_option(should_listen, "Listen instead of connecting", "listen", 'l');
|
|
||||||
args_parser.add_option(verbose, "Log everything that's happening", "verbose", 'v');
|
|
||||||
args_parser.add_option(udp_mode, "UDP mode", "udp", 'u');
|
|
||||||
args_parser.add_option(should_close, "Close connection after reading stdin to the end", nullptr, 'N');
|
|
||||||
args_parser.add_option(maximum_tcp_receive_buffer_size_input, "Set maximum tcp receive buffer size", "length", 'I', nullptr);
|
args_parser.add_option(maximum_tcp_receive_buffer_size_input, "Set maximum tcp receive buffer size", "length", 'I', nullptr);
|
||||||
|
args_parser.add_option(should_listen, "Listen instead of connecting", "listen", 'l');
|
||||||
|
args_parser.add_option(should_close, "Close connection after reading stdin to the end", nullptr, 'N');
|
||||||
|
args_parser.add_option(udp_mode, "UDP mode", "udp", 'u');
|
||||||
|
args_parser.add_option(verbose, "Log everything that's happening", "verbose", 'v');
|
||||||
args_parser.add_positional_argument(target, "Address to listen on, or the address or hostname to connect to", "target");
|
args_parser.add_positional_argument(target, "Address to listen on, or the address or hostname to connect to", "target");
|
||||||
args_parser.add_positional_argument(port, "Port to connect to or listen on", "port");
|
args_parser.add_positional_argument(port, "Port to connect to or listen on", "port");
|
||||||
args_parser.parse(arguments);
|
args_parser.parse(arguments);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue