Skip to content

Commit 7830a22

Browse files
authored
Merge pull request #1702 from drwetter/unrecognized_option--version
Phrase cmd line option "--version" & friends as standalone
2 parents a292921 + 1d95423 commit 7830a22

4 files changed

Lines changed: 25 additions & 27 deletions

File tree

doc/testssl.1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ Options are either short or long options\. Any long or short option requiring a
7575
.P
7676
\fB<URI>\fR or \fB\-\-file <FILE>\fR always needs to be the last parameter\.
7777
.
78-
.SS "BANNER OPTIONS"
79-
\fB\-\-help\fR (or no arg) display command line help
78+
.SS "BANNER OPTIONS (standalone)"
79+
\fB\-\-help\fR (or no arg) displays command line help
8080
.
8181
.P
8282
\fB\-b, \-\-banner\fR displays testssl\.sh banner, including license, usage conditions, version of testssl\.sh, detected openssl version, its path to it, # of ciphers of openssl, its build date and the architecture\.
@@ -85,7 +85,7 @@ Options are either short or long options\. Any long or short option requiring a
8585
\fB\-v, \-\-version\fR same as before
8686
.
8787
.P
88-
\fB\-V [pattern] , \-\-local [pattern]\fR pretty print all local ciphers supported by openssl version\. If a pattern is supplied it performs a match (ignore case) on any of the strings supplied in the wide output, see below\. The pattern will be searched in the any of the columns: hexcode, cipher suite name (OpenSSL or IANA), key exchange, encryption, bits\. It does a word pattern match for non\-numbers, for number just a normal match applies\. Numbers here are defined as [0\-9,A\-F]\. This means (attention: catch) that the pattern CBC is matched as non\-word, but AES as word\.
88+
\fB\-V [pattern], \-\-local [pattern]\fR pretty print all local ciphers supported by openssl version\. If a pattern is supplied it performs a match (ignore case) on any of the strings supplied in the wide output, see below\. The pattern will be searched in the any of the columns: hexcode, cipher suite name (OpenSSL or IANA), key exchange, encryption, bits\. It does a word pattern match for non\-numbers, for number just a normal match applies\. Numbers here are defined as [0\-9,A\-F]\. This means (attention: catch) that the pattern CBC is matched as non\-word, but AES as word\. This option also accepts -\fB-openssl=<path_to_openssl>\fR\.
8989
.
9090
.SS "INPUT PARAMETERS"
9191
\fBURI\fR can be a hostname, an IPv4 or IPv6 address (restriction see below) or an URL\. IPv6 addresses need to be in square brackets\. For any given parameter port 443 is assumed unless specified by appending a colon and a port number\. The only preceding protocol specifier allowed is \fBhttps\fR\. You need to be aware that checks for an IP address might not hit the vhost you want\. DNS resolution (A/AAAA record) is being performed unless you have an \fB/etc/hosts\fR entry for the hostname\.

doc/testssl.1.html

Lines changed: 7 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/testssl.1.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,15 @@ Options are either short or long options. Any long or short option requiring a v
6666

6767
`<URI>` or `--file <FILE>` always needs to be the last parameter.
6868

69-
### BANNER OPTIONS
69+
### BANNER OPTIONS (standalone)
7070

71-
`--help` (or no arg) display command line help
71+
`--help` (or no arg) displays command line help
7272

7373
`-b, --banner` displays testssl.sh banner, including license, usage conditions, version of testssl.sh, detected openssl version, its path to it, # of ciphers of openssl, its build date and the architecture.
7474

7575
`-v, --version` same as before
7676

77-
`-V [pattern] , --local [pattern]` pretty print all local ciphers supported by openssl version. If a pattern is supplied it performs a match (ignore case) on any of the strings supplied in the wide output, see below. The pattern will be searched in the any of the columns: hexcode, cipher suite name (OpenSSL or IANA), key exchange, encryption, bits. It does a word pattern match for non-numbers, for number just a normal match applies. Numbers here are defined as [0-9,A-F]. This means (attention: catch) that the pattern CBC is matched as non-word, but AES as word.
77+
`-V [pattern], --local [pattern]` pretty print all local ciphers supported by openssl version. If a pattern is supplied it performs a match (ignore case) on any of the strings supplied in the wide output, see below. The pattern will be searched in the any of the columns: hexcode, cipher suite name (OpenSSL or IANA), key exchange, encryption, bits. It does a word pattern match for non-numbers, for number just a normal match applies. Numbers here are defined as [0-9,A-F]. This means (attention: catch) that the pattern CBC is matched as non-word, but AES as word. This option also accepts `--openssl=<path_to_openssl>`.
7878

7979
### INPUT PARAMETERS
8080

testssl.sh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18808,26 +18808,23 @@ help() {
1880818808

1880918809
"$PROG_NAME [options] <URI>" or "$PROG_NAME <options>"
1881018810

18811-
18812-
"$PROG_NAME <options>", where <options> is:
18811+
"$PROG_NAME <option>", where <option> is mostly standalone and one of:
1881318812

1881418813
--help what you're looking at
1881518814
-b, --banner displays banner + version of $PROG_NAME
1881618815
-v, --version same as previous
18817-
-V, --local pretty print all local ciphers
18818-
-V, --local <pattern> which local ciphers with <pattern> are available? If pattern is not a number: word match
18819-
18820-
<pattern> is always an ignore case word pattern of cipher hexcode or any other string in the name, kx or bits
18816+
-V, --local [pattern] pretty print all local ciphers (of openssl only). If search pattern supplied: it is an
18817+
an ignore case word pattern of cipher hexcode or any other string in its name, kx or bits
1882118818

18822-
"$PROG_NAME <URI>", where <URI> is:
18819+
"$PROG_NAME [options] <URI>", where <URI> is:
1882318820

18824-
<URI> host|host:port|URL|URL:port port 443 is default, URL can only contain HTTPS protocol)
18821+
<URI> host|host:port|URL|URL:port port 443 is default, URL can only contain HTTPS as a protocol
1882518822

18826-
"$PROG_NAME [options] <URI>", where [options] is:
18823+
and [options] is/are:
1882718824

18828-
-t, --starttls <protocol> Does a default run against a STARTTLS enabled <protocol,
18829-
protocol is <ftp|smtp|lmtp|pop3|imap|xmpp|xmpp-server|telnet|ldap|nntp|postgres|mysql>
18830-
--xmpphost <to_domain> For STARTTLS enabled XMPP it supplies the XML stream to-'' domain -- sometimes needed
18825+
-t, --starttls <protocol> Does a run against a STARTTLS enabled service which is one of ftp, smtp, lmtp, pop3, imap,
18826+
xmpp, xmpp-server, telnet, ldap, nntp, postgres, mysql
18827+
--xmpphost <to_domain> For STARTTLS xmpp or xmpp-server checks it supplies the domainname (like SNI)
1883118828
--mx <domain/host> Tests MX records from high to low priority (STARTTLS, port 25)
1883218829
--file/-iL <fname> Mass testing option: Reads one testssl.sh command line per line from <fname>.
1883318830
Can be combined with --serial or --parallel. Implicitly turns on "--warnings batch".
@@ -21345,6 +21342,9 @@ parse_cmd_line() {
2134521342

2134621343
while [[ $# -gt 0 ]]; do
2134721344
case $1 in
21345+
--help|-b|--banner|-v|--version)
21346+
fatal "$1 is a standalone command line option"
21347+
;;
2134821348
--mx)
2134921349
do_mx_all_ips=true
2135021350
PORT=25

0 commit comments

Comments
 (0)