From eb3227c837efcdfa62a2d666e53e1f1e7fbe56ac Mon Sep 17 00:00:00 2001 From: Peter Mosmans Date: Fri, 29 May 2015 09:17:56 +0200 Subject: [PATCH] FIX: show banner when specifying banner option Addition: show git commit hash and summary instead of 'poor man's ident' :) --- testssl.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/testssl.sh b/testssl.sh index bc6d9e7..8c5e569 100755 --- a/testssl.sh +++ b/testssl.sh @@ -3063,6 +3063,7 @@ mybanner() { hn=$(hostname) #poor man's ident (nowadays ident not neccessarily installed) idtag=$(grep -a '\$Id' $0 | grep -aw "[E]xp" | sed -e 's/^# //' -e 's/\$ $/\$/') + which git &>/dev/null && idtag="$(git log --format='%h %s (%ci)' -1)" [ "$COLOR" -ne 0 ] && idtag="\033[1;30m$idtag\033[m\033[1m" bb=$(cat <