testssl.sh
testssl.sh copied to clipboard
Command line in HTML / CSV / flat JSON file output...
.. is missing.
Should be easy to add in the comment
Currently, the command line can already get included in the HTML output in two different ways. I think it is similar for CSV, too.
-
Whenever you are using the
--file
option, it will output the command line for in the functionrun_mass_testing()
anyway:outln "$(create_cmd_line_string "$0" "${MASS_TESTING_CMDLINE[@]}")"
. It looks like this: -
There is a function
html_banner()
which outputs command line, testssl.sh and openssl version and test date/time. Currently, it only outputs something when the conditionif "$CHILD_MASS_TESTING" && "$HTMLHEADER"; then
is met. This condition is only met when you use both the options--html
and--file TESTSSL_CMD_LINES
, i.e if you are mass testing and creating one html file per tested host. It looks like this:
What exactly should be the intended behavior here?
Intended behaviour (for which the issue is supposed to be about) is that testssl.sh should always contain the command line in the html output.
When running testssl.sh --html testssl.sh
I get
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- This file was created with testssl.sh. https://testssl.sh -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="application/xml
[..]
No cmd line.
It's just inconsistent to what one will get when using JSON. It should be independent of using mass testing or any other siwthc / ENV var.
PS: CSV and JSON flat don't do that either but at the time I opened this issue I worried only about HTML
The info just needs to be added around This file was created with testssl.sh.
in html_header()
.
The slightly tricky part is the logic regarding mass testing