mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-06 00:39:44 +01:00
commit
477f6eb053
14
testssl.sh
14
testssl.sh
@ -133,6 +133,7 @@ TERM_CURRPOS=0 # custom line wrapping ne
|
|||||||
|
|
||||||
declare -x OPENSSL
|
declare -x OPENSSL
|
||||||
COLOR=${COLOR:-2} # 2: Full color, 1: b/w+positioning, 0: no ESC at all
|
COLOR=${COLOR:-2} # 2: Full color, 1: b/w+positioning, 0: no ESC at all
|
||||||
|
COLORBLIND=${COLORBLIND:-false} # if true, swap blue and green in the output
|
||||||
SHOW_EACH_C=${SHOW_EACH_C:-0} # where individual ciphers are tested show just the positively ones tested #FIXME: upside down value
|
SHOW_EACH_C=${SHOW_EACH_C:-0} # where individual ciphers are tested show just the positively ones tested #FIXME: upside down value
|
||||||
SNEAKY=${SNEAKY:-false} # is the referer and useragent we leave behind just usual?
|
SNEAKY=${SNEAKY:-false} # is the referer and useragent we leave behind just usual?
|
||||||
QUIET=${QUIET:-false} # don't output the banner. By doing this yiu acknowledge usage term appearing in the banner
|
QUIET=${QUIET:-false} # don't output the banner. By doing this yiu acknowledge usage term appearing in the banner
|
||||||
@ -302,9 +303,9 @@ outln() { out "$1\n"; }
|
|||||||
#TODO: Still no shell injection safe but if just run it from the cmd line: that's fine
|
#TODO: Still no shell injection safe but if just run it from the cmd line: that's fine
|
||||||
|
|
||||||
# color print functions, see also http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html
|
# color print functions, see also http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html
|
||||||
pr_liteblue() { [[ "$COLOR" -eq 2 ]] && out "\033[0;34m$1" || out "$1"; pr_off; } # not yet used
|
pr_liteblue() { [[ "$COLOR" -eq 2 ]] && ( "$COLORBLIND" && out "\033[0;32m$1" || out "\033[0;34m$1" ) || out "$1"; pr_off; } # not yet used
|
||||||
pr_liteblueln() { pr_liteblue "$1"; outln; }
|
pr_liteblueln() { pr_liteblue "$1"; outln; }
|
||||||
pr_blue() { [[ "$COLOR" -eq 2 ]] && out "\033[1;34m$1" || out "$1"; pr_off; } # used for head lines of single tests
|
pr_blue() { [[ "$COLOR" -eq 2 ]] && ( "$COLORBLIND" && out "\033[1;32m$1" || out "\033[1;34m$1" ) || out "$1"; pr_off; } # used for head lines of single tests
|
||||||
pr_blueln() { pr_blue "$1"; outln; }
|
pr_blueln() { pr_blue "$1"; outln; }
|
||||||
|
|
||||||
pr_litered() { [[ "$COLOR" -eq 2 ]] && out "\033[0;31m$1" || pr_bold "$1"; pr_off; } # this is bad
|
pr_litered() { [[ "$COLOR" -eq 2 ]] && out "\033[0;31m$1" || pr_bold "$1"; pr_off; } # this is bad
|
||||||
@ -327,9 +328,9 @@ pr_litegrey() { [[ "$COLOR" -eq 2 ]] && out "\033[0;37m$1" || out "$1"; pr_off
|
|||||||
pr_grey() { [[ "$COLOR" -eq 2 ]] && out "\033[1;30m$1" || out "$1"; pr_off; }
|
pr_grey() { [[ "$COLOR" -eq 2 ]] && out "\033[1;30m$1" || out "$1"; pr_off; }
|
||||||
pr_greyln() { pr_grey "$1"; outln; }
|
pr_greyln() { pr_grey "$1"; outln; }
|
||||||
|
|
||||||
pr_litegreen() { [[ "$COLOR" -eq 2 ]] && out "\033[0;32m$1" || out "$1"; pr_off; } # This is good
|
pr_litegreen() { [[ "$COLOR" -eq 2 ]] && ( "$COLORBLIND" && out "\033[0;34m$1" || out "\033[0;32m$1" ) || out "$1"; pr_off; } # This is good
|
||||||
pr_litegreenln() { pr_litegreen "$1"; outln; }
|
pr_litegreenln() { pr_litegreen "$1"; outln; }
|
||||||
pr_green() { [[ "$COLOR" -eq 2 ]] && out "\033[1;32m$1" || out "$1"; pr_off; } # This is the best
|
pr_green() { [[ "$COLOR" -eq 2 ]] && ( "$COLORBLIND" && out "\033[1;34m$1" || out "\033[1;32m$1" ) || out "$1"; pr_off; } # This is the best
|
||||||
pr_greenln() { pr_green "$1"; outln; }
|
pr_greenln() { pr_green "$1"; outln; }
|
||||||
|
|
||||||
pr_yellow() { [[ "$COLOR" -eq 2 ]] && out "\033[1;33m$1" || out "$1"; pr_off; } # academic or minor problem
|
pr_yellow() { [[ "$COLOR" -eq 2 ]] && out "\033[1;33m$1" || out "$1"; pr_off; } # academic or minor problem
|
||||||
@ -4590,6 +4591,7 @@ tuning options (can also be preset via environment variables):
|
|||||||
--mapping <no-rfc> don't display the RFC Cipher Suite Name
|
--mapping <no-rfc> don't display the RFC Cipher Suite Name
|
||||||
--warnings <batch|off|false> "batch" doesn't wait for keypress, "off" or "false" skips connection warning
|
--warnings <batch|off|false> "batch" doesn't wait for keypress, "off" or "false" skips connection warning
|
||||||
--color <0|1|2> 0: no escape or other codes, 1: b/w escape codes, 2: color (default)
|
--color <0|1|2> 0: no escape or other codes, 1: b/w escape codes, 2: color (default)
|
||||||
|
--colorblind swap green and blue in the output
|
||||||
--debug <0-6> 1: screen output normal but debug output in temp files. 2-6: see line ~120
|
--debug <0-6> 1: screen output normal but debug output in temp files. 2-6: see line ~120
|
||||||
|
|
||||||
All options requiring a value can also be called with '=' e.g. testssl.sh -t=smtp --wide --openssl=/usr/bin/openssl <URI>.
|
All options requiring a value can also be called with '=' e.g. testssl.sh -t=smtp --wide --openssl=/usr/bin/openssl <URI>.
|
||||||
@ -4653,6 +4655,7 @@ MAPPING_FILE_RFC: $MAPPING_FILE_RFC
|
|||||||
CAPATH: $CAPATH
|
CAPATH: $CAPATH
|
||||||
ECHO: $ECHO
|
ECHO: $ECHO
|
||||||
COLOR: $COLOR
|
COLOR: $COLOR
|
||||||
|
COLORBLIND: $COLORBLIND
|
||||||
TERM_DWITH: $TERM_DWITH
|
TERM_DWITH: $TERM_DWITH
|
||||||
INTERACTIVE: $INTERACTIVE
|
INTERACTIVE: $INTERACTIVE
|
||||||
HAS_GNUDATE: $HAS_GNUDATE
|
HAS_GNUDATE: $HAS_GNUDATE
|
||||||
@ -5704,6 +5707,9 @@ parse_cmd_line() {
|
|||||||
help 1
|
help 1
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
--colorblind)
|
||||||
|
COLORBLIND=true
|
||||||
|
;;
|
||||||
--log|--logging)
|
--log|--logging)
|
||||||
do_logging=true
|
do_logging=true
|
||||||
;; # DEFINITION of LOGFILE if no arg specified via ENV or automagically in parse_hn_ports()
|
;; # DEFINITION of LOGFILE if no arg specified via ENV or automagically in parse_hn_ports()
|
||||||
|
Loading…
Reference in New Issue
Block a user