mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-07 09:10:57 +01:00
Merge remote-tracking branch 'origin/3.0' into digrc_3.0
This commit is contained in:
commit
556208815a
@ -6,6 +6,7 @@
|
|||||||
use strict;
|
use strict;
|
||||||
use Test::More;
|
use Test::More;
|
||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
|
use Text::Diff;
|
||||||
|
|
||||||
my $tests = 0;
|
my $tests = 0;
|
||||||
my $prg="./testssl.sh";
|
my $prg="./testssl.sh";
|
||||||
@ -15,6 +16,7 @@ my $html="";
|
|||||||
my $debughtml="";
|
my $debughtml="";
|
||||||
my $edited_html="";
|
my $edited_html="";
|
||||||
my $check2run="--ip=one --color 0 --htmlfile tmp.html";
|
my $check2run="--ip=one --color 0 --htmlfile tmp.html";
|
||||||
|
my $diff="";
|
||||||
|
|
||||||
die "Unable to open $prg" unless -f $prg;
|
die "Unable to open $prg" unless -f $prg;
|
||||||
|
|
||||||
@ -72,5 +74,8 @@ $debughtml =~ s/.*DEBUG:.*\n//g;
|
|||||||
cmp_ok($debughtml, "eq", $html, "HTML file created with --debug 4 matches HTML file created without --debug");
|
cmp_ok($debughtml, "eq", $html, "HTML file created with --debug 4 matches HTML file created without --debug");
|
||||||
$tests++;
|
$tests++;
|
||||||
|
|
||||||
|
$diff = diff \$debughtml, \$html;
|
||||||
|
printf "\n%s\n", "$diff";
|
||||||
|
|
||||||
printf "\n";
|
printf "\n";
|
||||||
done_testing($tests);
|
done_testing($tests);
|
||||||
|
21
testssl.sh
21
testssl.sh
@ -599,7 +599,9 @@ pr_bold() { tm_bold "$1"; [[ "$COLOR" -ne 0 ]] && html_out "<span style=\"
|
|||||||
prln_bold() { pr_bold "$1" ; outln; }
|
prln_bold() { pr_bold "$1" ; outln; }
|
||||||
|
|
||||||
NO_ITALICS=false
|
NO_ITALICS=false
|
||||||
if [[ $SYSTEM == OpenBSD ]]; then
|
if [[ $TERM == screen ]]; then
|
||||||
|
NO_ITALICS=true
|
||||||
|
elif [[ $SYSTEM == OpenBSD ]]; then
|
||||||
NO_ITALICS=true
|
NO_ITALICS=true
|
||||||
elif [[ $SYSTEM == FreeBSD ]]; then
|
elif [[ $SYSTEM == FreeBSD ]]; then
|
||||||
if [[ ${SYSTEMREV%\.*} -le 9 ]]; then
|
if [[ ${SYSTEMREV%\.*} -le 9 ]]; then
|
||||||
@ -867,7 +869,7 @@ fileout_pretty_json_banner() {
|
|||||||
|
|
||||||
echo -e " \"Invocation\" : \"$PROG_NAME $CMDLINE\",
|
echo -e " \"Invocation\" : \"$PROG_NAME $CMDLINE\",
|
||||||
\"at\" : \"$HNAME:$OPENSSL_LOCATION\",
|
\"at\" : \"$HNAME:$OPENSSL_LOCATION\",
|
||||||
\"version\" : \"$VERSION ${GIT_REL_SHORT:-$CVS_REL_SHORT} from $REL_DATE\",
|
\"version\" : \"$VERSION ${GIT_REL_SHORT} from $REL_DATE\",
|
||||||
\"openssl\" : \"$OSSL_NAME $OSSL_VER from $OSSL_BUILD_DATE\",
|
\"openssl\" : \"$OSSL_NAME $OSSL_VER from $OSSL_BUILD_DATE\",
|
||||||
\"startTime\" : \"$START_TIME\",
|
\"startTime\" : \"$START_TIME\",
|
||||||
\"scanResult\" : ["
|
\"scanResult\" : ["
|
||||||
@ -1097,7 +1099,7 @@ html_banner() {
|
|||||||
if "$CHILD_MASS_TESTING" && "$HTMLHEADER"; then
|
if "$CHILD_MASS_TESTING" && "$HTMLHEADER"; then
|
||||||
html_out "## Scan started as: \"$PROG_NAME $CMDLINE\"\n"
|
html_out "## Scan started as: \"$PROG_NAME $CMDLINE\"\n"
|
||||||
html_out "## at $HNAME:$OPENSSL_LOCATION\n"
|
html_out "## at $HNAME:$OPENSSL_LOCATION\n"
|
||||||
html_out "## version testssl: $VERSION ${GIT_REL_SHORT:-$CVS_REL_SHORT} from $REL_DATE\n"
|
html_out "## version testssl: $VERSION ${GIT_REL_SHORT} from $REL_DATE\n"
|
||||||
html_out "## version openssl: \"$OSSL_NAME $OSSL_VER\" from \"$OSSL_BUILD_DATE\")\n\n"
|
html_out "## version openssl: \"$OSSL_NAME $OSSL_VER\" from \"$OSSL_BUILD_DATE\")\n\n"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -1141,7 +1143,7 @@ prepare_logging() {
|
|||||||
fi
|
fi
|
||||||
tmln_out "## Scan started as: \"$PROG_NAME $CMDLINE\"" >>"$LOGFILE"
|
tmln_out "## Scan started as: \"$PROG_NAME $CMDLINE\"" >>"$LOGFILE"
|
||||||
tmln_out "## at $HNAME:$OPENSSL_LOCATION" >>"$LOGFILE"
|
tmln_out "## at $HNAME:$OPENSSL_LOCATION" >>"$LOGFILE"
|
||||||
tmln_out "## version testssl: $VERSION ${GIT_REL_SHORT:-$CVS_REL_SHORT} from $REL_DATE" >>"$LOGFILE"
|
tmln_out "## version testssl: $VERSION ${GIT_REL_SHORT} from $REL_DATE" >>"$LOGFILE"
|
||||||
tmln_out "## version openssl: \"$OSSL_VER\" from \"$OSSL_BUILD_DATE\")\n" >>"$LOGFILE"
|
tmln_out "## version openssl: \"$OSSL_VER\" from \"$OSSL_BUILD_DATE\")\n" >>"$LOGFILE"
|
||||||
exec > >(tee -a -i "$LOGFILE")
|
exec > >(tee -a -i "$LOGFILE")
|
||||||
}
|
}
|
||||||
@ -17508,9 +17510,7 @@ mybanner() {
|
|||||||
"$QUIET" && return
|
"$QUIET" && return
|
||||||
"$CHILD_MASS_TESTING" && return
|
"$CHILD_MASS_TESTING" && return
|
||||||
OPENSSL_NR_CIPHERS=$(count_ciphers "$(actually_supported_osslciphers 'ALL:COMPLEMENTOFALL:@STRENGTH' 'ALL')")
|
OPENSSL_NR_CIPHERS=$(count_ciphers "$(actually_supported_osslciphers 'ALL:COMPLEMENTOFALL:@STRENGTH' 'ALL')")
|
||||||
[[ -z "$GIT_REL" ]] && \
|
[[ -n "$GIT_REL" ]] && idtag="$GIT_REL"
|
||||||
idtag="$CVS_REL" || \
|
|
||||||
idtag="$GIT_REL -- $CVS_REL_SHORT"
|
|
||||||
bb1=$(cat <<EOF
|
bb1=$(cat <<EOF
|
||||||
|
|
||||||
###########################################################
|
###########################################################
|
||||||
@ -19540,6 +19540,13 @@ parse_cmd_line() {
|
|||||||
do_client_simulation=true
|
do_client_simulation=true
|
||||||
;;
|
;;
|
||||||
-U|--vulnerable|--vulnerabilities)
|
-U|--vulnerable|--vulnerabilities)
|
||||||
|
# Lookahead function: If the order of the cmdline is '-U --ids-friendly'
|
||||||
|
# then we need to make sure we catch --ids-friendly. Normally we do not,
|
||||||
|
# see #1717. The following statement makes sure. In the do-while + case-esac
|
||||||
|
# loop it will be execute again, but it does not hurt
|
||||||
|
if [[ "${CMDLINE_ARRAY[@]}" =~ --ids-friendly ]]; then
|
||||||
|
OFFENSIVE=false
|
||||||
|
fi
|
||||||
do_vulnerabilities=true
|
do_vulnerabilities=true
|
||||||
do_heartbleed="$OFFENSIVE"
|
do_heartbleed="$OFFENSIVE"
|
||||||
do_ccs_injection="$OFFENSIVE"
|
do_ccs_injection="$OFFENSIVE"
|
||||||
|
Loading…
Reference in New Issue
Block a user