From 8ad1cca0ab170b2b7881343e2258d902ffd953c7 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Fri, 13 Mar 2015 15:10:36 -0500 Subject: [PATCH] Remove useless kittens --- testssl.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/testssl.sh b/testssl.sh index 0b02f67..43f77a6 100755 --- a/testssl.sh +++ b/testssl.sh @@ -505,7 +505,7 @@ serverbanner() { pr_bold " Server " grep -ai '^Server' $HEADERFILE >$TMPFILE if [ $? -eq 0 ]; then - serverbanner=$(cat $TMPFILE | sed -e 's/^Server: //' -e 's/^server: //') + serverbanner=$(sed -e 's/^Server: //' -e 's/^server: //' $TMPFILE) if [ x"$serverbanner" == "x\n" -o x"$serverbanner" == "x\n\r" -o x"$serverbanner" == "x" ]; then outln "banner exists but empty string" else @@ -553,7 +553,7 @@ cookieflags() { # ARG1: Path, ARG2: path pr_bold " Cookie(s) " grep -ai '^Set-Cookie' $HEADERFILE >$TMPFILE if [ $? -eq 0 ]; then - nr_cookies=$(cat $TMPFILE | wc -l) + nr_cookies=$(wc -l $TMPFILE) out "$nr_cookies issued: " if [ $nr_cookies -gt 1 ] ; then negative_word="NONE" @@ -645,7 +645,7 @@ listciphers() { std_cipherlists() { out "$2 "; if listciphers $1; then # is that locally available?? - [ $SHOW_LOC_CIPH = "1" ] && out "local ciphers are: " && cat $TMPFILE | sed 's/:/, /g' + [ $SHOW_LOC_CIPH = "1" ] && out "local ciphers are: " && sed 's/:/, /g' $TMPFILE $OPENSSL s_client -cipher "$1" $STARTTLS -connect $NODEIP:$PORT $SNI 2>$TMPFILE >/dev/null $TMPFILE $TMPFILE