Skip to content

Commit e7619fa

Browse files
committed
Documenting exit error codes improvements
See prevoius commit b2be380 and issue #985 / #752.
1 parent b2be380 commit e7619fa

3 files changed

Lines changed: 68 additions & 38 deletions

File tree

doc/testssl.1

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -148,14 +148,12 @@ Please note that the content of \fBfname\fR has to be in Unix format\. DOS carri
148148
.P
149149
\fB\-\-assuming\-http\fR testssl\.sh does upfront an application protocol detection\. In cases where for some reasons the usage of HTTP cannot be automatically detected you may want to use this option\. It tells testssl\.sh not to skip HTTP specific tests and to run the client simulation with browsers\. Sometimes also the severity depends on the application protocol, e\.g\. SHA1 signed certificates, the lack of any SAN matches and some vulnerabilities will be punished harder when checking a web server as opposed to a mail server\.
150150
.
151-
.IP "\(bu" 4
151+
.P
152152
\fB\-n, \-\-nodns <min|none>\fR tells testssl\.sh which DNS lookups should be performed\. \fBmin\fR uses only forward DNS resolution (A and AAAA record or MX record) and skips CAA lookups and PTR records from the IP address back to a DNS name\. \fBnone\fR performs no DNS lookups at all\. For the latter you either have to supply the IP address as a target, to use \fB\-\-ip\fR or have the IP address in /etc/hosts\. The use of the switch is only useful if you either can\'t or are not willing to perform DNS lookups\. The latter can apply e\.g\. to some pentestsi\. In general this option could e\.g\. help you to avoid timeouts by DNS lookups\. \fBNODNS\fR is the enviroment variable for this\.
153153
.
154-
.IP "\(bu" 4
154+
.P
155155
\fB\-\-sneaky\fR as a friendly feature for the server side testssl\.sh uses a HTTP user agent \fBTLS tester from ${URL}\fR\. With this option your traces are less verbose and a Firefox user agent is being used\. Be aware that it doesn\'t hide your activities\. That is just not possible (environment preset via \fBSNEAKY=true\fR)\.
156156
.
157-
.IP "" 0
158-
.
159157
.SS "SINGLE CHECK OPTIONS"
160158
Any single check switch supplied as an argument prevents testssl\.sh from doing a default run\. It just takes this and if supplied other options and runs them \- in the order they would also appear in the default run\.
161159
.
@@ -684,22 +682,43 @@ TLSWG Draft: The Transport Layer Security (TLS) Protocol Version 1\.3
684682
50\-200 reserved for returning a vulnerability scoring for system monitoring or a CI tools
685683
.
686684
.IP "\(bu" 4
687-
245 no bash used
685+
242 (ERR_CHILD) Child received a signal from master
686+
.
687+
.IP "\(bu" 4
688+
244 (ERR_RESOURCE) Resources testssl\.sh needs couldn\'t be read
689+
.
690+
.IP "\(bu" 4
691+
245 (ERR_CLUELESS) Weird state, either though user options or testssl\.sh
692+
.
693+
.IP "\(bu" 4
694+
246 (ERR_CONNECT) Connectivity problem
695+
.
696+
.IP "\(bu" 4
697+
247 (ERR_DNSLOOKUP) Problem with resolving IP addresses or names
698+
.
699+
.IP "\(bu" 4
700+
248 (ERR_OTHERCLIENT) Other client problem
701+
.
702+
.IP "\(bu" 4
703+
249 (ERR_DNSBIN) Problem with DNS lookup binaries
704+
.
705+
.IP "\(bu" 4
706+
250 (ERR_OSSLBIN) Problem with OpenSSL binary
688707
.
689708
.IP "\(bu" 4
690-
249 temp file creation problem
709+
251 (ERR_NOSUPPORT) Feature requested is not supported
691710
.
692711
.IP "\(bu" 4
693-
251 feature not yet supported
712+
252 (ERR_FNAMEPARSE) Input file couldn\'t be parsed
694713
.
695714
.IP "\(bu" 4
696-
252 no DNS resolver found or not executable / proxy couldn\'t be determined from given values / \-xmpphost supplied but OPENSSL too old
715+
253 (ERR_FCREATE) Output file couldn\'t be created
697716
.
698717
.IP "\(bu" 4
699-
253 no SSL/TLS enabled server / OPENSSL too old / couldn\'t connect to proxy / couldn\'t connect via STARTTLS
718+
254 (ERR_CMDLINE) Cmd line couldn\'t be parsed
700719
.
701720
.IP "\(bu" 4
702-
254 no OPENSSL found or not executable / no IPv4 address could be determined / illegal STARTTLS protocol supplied / supplied file name not readable
721+
255 (ERR_BASH ) Bash version incorrect
703722
.
704723
.IP "" 0
705724
.

doc/testssl.1.html

Lines changed: 20 additions & 15 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: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,11 @@ Please note that the content of `fname` has to be in Unix format. DOS carriage r
119119

120120
`--assuming-http` testssl.sh does upfront an application protocol detection. In cases where for some reasons the usage of HTTP cannot be automatically detected you may want to use this option. It tells testssl.sh not to skip HTTP specific tests and to run the client simulation with browsers. Sometimes also the severity depends on the application protocol, e.g. SHA1 signed certificates, the lack of any SAN matches and some vulnerabilities will be punished harder when checking a web server as opposed to a mail server.
121121

122-
* `-n, --nodns <min|none>` tells testssl.sh which DNS lookups should be performed. `min` uses only forward DNS resolution (A and AAAA record or MX record) and skips CAA lookups and PTR records from the IP address back to a DNS name. `none` performs no
122+
`-n, --nodns <min|none>` tells testssl.sh which DNS lookups should be performed. `min` uses only forward DNS resolution (A and AAAA record or MX record) and skips CAA lookups and PTR records from the IP address back to a DNS name. `none` performs no
123123
DNS lookups at all. For the latter you either have to supply the IP address as a target, to use `--ip` or have the IP address
124124
in /etc/hosts. The use of the switch is only useful if you either can't or are not willing to perform DNS lookups. The latter can apply e.g. to some pentestsi. In general this option could e.g. help you to avoid timeouts by DNS lookups. `NODNS` is the enviroment variable for this.
125125

126-
* `--sneaky` as a friendly feature for the server side testssl.sh uses a HTTP user agent `TLS tester from ${URL}`. With this option your traces are less verbose and a Firefox user agent is being used. Be aware that it doesn't hide your activities. That is just not possible (environment preset via `SNEAKY=true`).
126+
`--sneaky` as a friendly feature for the server side testssl.sh uses a HTTP user agent `TLS tester from ${URL}`. With this option your traces are less verbose and a Firefox user agent is being used. Be aware that it doesn't hide your activities. That is just not possible (environment preset via `SNEAKY=true`).
127127

128128

129129
### SINGLE CHECK OPTIONS
@@ -206,9 +206,9 @@ Also the Certification Authority Authorization (CAA) record is displayed.
206206

207207
`-I, --ccs, --ccs-injection` Checks for CCS injection which is an openssl vulnerability. Sometimes also here the check needs to wait for a reply. The predefined timeout of 5 seconds can be changed with the environment variable `CCS_MAX_WAITSOCK`.
208208

209-
`-T, --ticketbleed` Checks for Ticketbleed memory leakage in BigIP loadbalancers.
209+
`-T, --ticketbleed` Checks for Ticketbleed memory leakage in BigIP loadbalancers.
210210

211-
`-BB, --robot` Checks for vulnerability to Bleichenbacher attacks.
211+
`-BB, --robot` Checks for vulnerability to Bleichenbacher attacks.
212212

213213
`-R, --renegotiation` Tests renegotiation vulnerabilities. Currently there's a check for "Secure Renegotiation" and for "Secure Client-Initiated Renegotiation". Please be aware that vulnerable servers to the latter can likely be DoSed very easily (HTTP). A check for "Insecure Client-Initiated Renegotiation" is not yet implemented.
214214

@@ -267,7 +267,7 @@ The same can be achieved by setting the environment variable `WARNINGS`.
267267

268268
`--colorblind` Swaps green and blue colors in the output, so that this percentage of folks (up to 8% of males, see https://en.wikipedia.org/wiki/Color_blindness) can distinguish those findings better. `COLORBLIND` is the according variable if you want to set this in the environment.
269269

270-
`--debug <0-6>` This gives you additional output on the screen (2-6), only useful for debugging. `DEBUG` is the according environment variable which you can use. There are six levels (0 is the default, thus it has no effect):
270+
`--debug <0-6>` This gives you additional output on the screen (2-6), only useful for debugging. `DEBUG` is the according environment variable which you can use. There are six levels (0 is the default, thus it has no effect):
271271

272272
1. screen output normal but leaves useful debug output in __/tmp/testssl.XXXXXX/__ . The info about the exact directory is included in the screen output.
273273
2. list more what's going on, status (high level) and connection errors, a few general debug output
@@ -304,7 +304,7 @@ The same can be achieved by setting the environment variable `WARNINGS`.
304304

305305
`-oa <filename>` / `--outfile <filename>` Does the same as the previous option but uses flat JSON instead.
306306

307-
`--hints` This option is not in use yet. This option is meant to give hints how to fix a finding or at least a help to improve something. GIVE_HINTS is the environment variable for this.
307+
`--hints` This option is not in use yet. This option is meant to give hints how to fix a finding or at least a help to improve something. GIVE_HINTS is the environment variable for this.
308308

309309
`--severity <severity>` For JSON and CSV output this will only add findings to the output file if a severity is equal or higher than the `severity` value specified. Allowed are `<LOW|MEDIUM|HIGH|CRITICAL>`. WARN is another severity level which translates to a client-side scanning error or problem. Implicitly you will see all WARN severities in a file.
310310

@@ -441,13 +441,19 @@ does the same on the plain text IMAP port. Please note that for plain TLS-encryp
441441
* 1 testssl.sh has encountered exactly one ambiguous situation or an error during run
442442
* 1+n same as previous. The errors or ambiguous results are added, also per IP.
443443
* 50-200 reserved for returning a vulnerability scoring for system monitoring or a CI tools
444-
* 245 no bash used
445-
* 249 temp file creation problem
446-
* 251 feature not yet supported
447-
* 252 no DNS resolver found or not executable / proxy couldn't be determined from given values / -xmpphost supplied but OPENSSL too old
448-
* 253 no SSL/TLS enabled server / OPENSSL too old / couldn't connect to proxy / couldn't connect via STARTTLS
449-
* 254 no OPENSSL found or not executable / no IPv4 address could be determined / illegal STARTTLS protocol supplied / supplied file name not readable
450-
444+
* 242 (ERR_CHILD) Child received a signal from master
445+
* 244 (ERR_RESOURCE) Resources testssl.sh needs couldn't be read
446+
* 245 (ERR_CLUELESS) Weird state, either though user options or testssl.sh
447+
* 246 (ERR_CONNECT) Connectivity problem
448+
* 247 (ERR_DNSLOOKUP) Problem with resolving IP addresses or names
449+
* 248 (ERR_OTHERCLIENT) Other client problem
450+
* 249 (ERR_DNSBIN) Problem with DNS lookup binaries
451+
* 250 (ERR_OSSLBIN) Problem with OpenSSL binary
452+
* 251 (ERR_NOSUPPORT) Feature requested is not supported
453+
* 252 (ERR_FNAMEPARSE) Input file couldn't be parsed
454+
* 253 (ERR_FCREATE) Output file couldn't be created
455+
* 254 (ERR_CMDLINE) Cmd line couldn't be parsed
456+
* 255 (ERR_BASH ) Bash version incorrect
451457

452458
## FILES
453459

0 commit comments

Comments
 (0)