From 9e1ed1c9cf43d8aa11c143bc8349997f7d246ae0 Mon Sep 17 00:00:00 2001 From: Dirk Date: Wed, 6 Dec 2017 10:23:24 +0100 Subject: [PATCH] Add check for -oA in nma greppable output --- testssl.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testssl.sh b/testssl.sh index c9dee61..ac2bae9 100755 --- a/testssl.sh +++ b/testssl.sh @@ -14436,7 +14436,7 @@ nmap_to_plain_file() { #FIXME: IPv6 is missing here # Ok, since we are here we are sure to have an nmap file. To avoid questions we make sure it's the right format too - if [[ "$(head -1 "$FNAME")" =~ ( -oG )(.*) ]]; then + if [[ "$(head -1 "$FNAME")" =~ ( -oG )(.*) ]] || [[ "$(head -1 "$FNAME")" =~ ( -oA )(.*) ]] ; then # yes, greppable if [[ $(grep -c Status "$FNAME") -ge 1 ]]; then [[ $(grep -c '\/open\/' "$FNAME") -eq 0 ]] && \ @@ -14445,7 +14445,7 @@ nmap_to_plain_file() { fatal "strange, nmap grepable misses \"Status\"" -1 fi else - fatal "Nmap file $FNAME is not in grep(p)able format (-oG filename.gmap)" -1 + fatal "Nmap file $FNAME is not in grep(p)able format (-oG filename.g(n)map)" -1 fi # strip extension and create output file *.txt in same folder target_fname="${FNAME%.*}.txt"