diff options
author | Rob Austein <sra@hactrn.net> | 2019-12-25 17:33:03 -0500 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2019-12-25 17:33:03 -0500 |
commit | b9d14f1a411557f9dd7617322e939322dabaefed (patch) | |
tree | fc177e5687b60b94a7cbb50ec24d89191c5270e5 | |
parent | edc47afc341bacaf5540791ed2cc7e5c5f72d699 (diff) |
Clean up help messages
-rw-r--r-- | README.md | 12 | ||||
-rwxr-xr-x | tsig-keygen.py | 15 |
2 files changed, 13 insertions, 14 deletions
@@ -4,25 +4,25 @@ tsig-keygen.py ``` usage: tsig-keygen.py [-h] [-a {hmac-sha256,hmac-sha384,hmac-sha512}] [-d DIRECTORY] [-f {bind9,nsd}] [-k KEY] [-n NAME] - [-o OUTPUT] [-s SERVERS [SERVERS ...]] - [-z ZONES [ZONES ...]] + [-o OUTPUT] [-s SERVER [SERVER ...]] + [-z ZONE [ZONE ...]] Pure Python TSIG key generator with multiple output formats. optional arguments: -h, --help show this help message and exit -a {hmac-sha256,hmac-sha384,hmac-sha512}, --algorithm {hmac-sha256,hmac-sha384,hmac-sha512} - TSIG algorithm + TSIG algorithm (default: hmac-sha256) -d DIRECTORY, --directory DIRECTORY where to store secondary zone files -f {bind9,nsd}, --format {bind9,nsd} - output format (default: nsd + output format (default: nsd) -k KEY, --key KEY TSIG shared secret (default: generate new secret) -n NAME, --name NAME DNS name for TSIG shared secret -o OUTPUT, --output OUTPUT output file - -s SERVERS [SERVERS ...], --servers SERVERS [SERVERS ...] + -s SERVER [SERVER ...], --servers SERVER [SERVER ...] address(es) of primary nameserver(s) - -z ZONES [ZONES ...], --zones ZONES [ZONES ...] + -z ZONE [ZONE ...], --zones ZONE [ZONE ...] zone(s) to xfr from specified nameserver(s) ``` diff --git a/tsig-keygen.py b/tsig-keygen.py index 2241759..fef9f45 100755 --- a/tsig-keygen.py +++ b/tsig-keygen.py @@ -1,8 +1,6 @@ #!/usr/bin/env python -""" -Pure Python TSIG key generator with multiple output formats. -""" +"Pure Python TSIG key generator with multiple output formats." import os, base64, argparse, jinja2 @@ -55,14 +53,15 @@ zone: ''') ap = argparse.ArgumentParser(description = __doc__) -ap.add_argument("-a", "--algorithm", choices = algorithm_choices, default = algorithm_choices[0], help = "TSIG algorithm") +ap.add_argument("-a", "--algorithm", choices = algorithm_choices, default = algorithm_choices[0], + help = "TSIG algorithm (default: " + algorithm_choices[0] + ")") ap.add_argument("-d", "--directory", default = "secondary", help = "where to store secondary zone files") -ap.add_argument("-f", "--format", choices = tuple(templates), default = "nsd", help = "output format (default: nsd") -ap.add_argument("-k", "--key", help = "TSIG shared secret (default: generate new secret)") +ap.add_argument("-f", "--format", choices = tuple(templates), default = "nsd", help = "output format (default: nsd)") +ap.add_argument("-k", "--key", help = "TSIG shared secret (default: generate new secret)") ap.add_argument("-n", "--name", default = "tsig.example.org", help = "DNS name for TSIG shared secret") ap.add_argument("-o", "--output", default = "-", type = argparse.FileType("w"), help = "output file") -ap.add_argument("-s", "--servers", nargs = "+", default = [], help = "address(es) of primary nameserver(s)") -ap.add_argument("-z", "--zones", nargs = "+", default = [], help = "zone(s) to xfr from specified nameserver(s)") +ap.add_argument("-s", "--servers", nargs = "+", default = [], metavar = "SERVER", help = "address(es) of primary nameserver(s)") +ap.add_argument("-z", "--zones", nargs = "+", default = [], metavar = "ZONE", help = "zone(s) to xfr from specified nameserver(s)") args = ap.parse_args() if args.key is None: |