mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-09-02 01:58:28 +02:00
Use grep -E
instead of egrep
This commit is contained in:
@ -181,7 +181,7 @@ starttls_line0() {
|
||||
debugme echo "... received result: "
|
||||
cat $reply
|
||||
if [ -n "$2" ]; then
|
||||
if egrep -q "$2" $reply; then
|
||||
if grep -Eq "$2" $reply; then
|
||||
debugme echo "---> reply matched \"$2\""
|
||||
[ $DEBUG -eq 0 ] && rm $reply
|
||||
return 0
|
||||
|
@ -297,8 +297,8 @@ check_revocation() {
|
||||
openssl ocsp $CA_BUNDLE_CMD $addissuer -cert $TMPDIR/level$1.crt -url $ocsp_uri -header HOST $ocsp_hostheader &>$TMPDIR/ocsp-response$1.txt
|
||||
|
||||
#tmpdir_escaped=`echo $TMPDIR | sed 's/\//\\\//g'`
|
||||
#cat $TMPDIR/ocsp-response.txt | egrep -v "^WARNING: no nonce|^Response Verify Failure|OCSP_basic_verify" | sed 's/'"${tmpdir_escaped}"'//'
|
||||
cat $TMPDIR/ocsp-response$1.txt | egrep -v "^WARNING: no nonce|^Response Verify Failure|OCSP_basic_verify" | sed 's/^.*level/level/'
|
||||
#cat $TMPDIR/ocsp-response.txt | grep -Ev "^WARNING: no nonce|^Response Verify Failure|OCSP_basic_verify" | sed 's/'"${tmpdir_escaped}"'//'
|
||||
cat $TMPDIR/ocsp-response$1.txt | grep -Ev "^WARNING: no nonce|^Response Verify Failure|OCSP_basic_verify" | sed 's/^.*level/level/'
|
||||
if grep -q "level$1.crt.*good" $TMPDIR/ocsp-response$1.txt ; then
|
||||
green "not revoked (OK)\c"
|
||||
else
|
||||
|
@ -159,7 +159,7 @@ starttls_line0() {
|
||||
debugme echo "... received result: "
|
||||
cat $reply
|
||||
if [ -n "$2" ]; then
|
||||
if egrep -q "$2" $reply; then
|
||||
if grep -Eq "$2" $reply; then
|
||||
debugme echo "---> reply matched \"$2\""
|
||||
[ $DEBUG -eq 0 ] && rm $reply
|
||||
return 0
|
||||
|
@ -9,13 +9,13 @@ echo "####################### session ID ######################"
|
||||
openssl s_client -connect $1:443 -servername $1 -bugs -no_ssl2 -no_ticket -sess_out /tmp/ssl_s </dev/null &>/dev/null
|
||||
|
||||
echo "--------------------------------------------------------"
|
||||
openssl s_client -connect $1:443 -servername $1 -bugs -no_ssl2 -no_ticket -sess_in /tmp/ssl_s </dev/null 2>/dev/null | egrep "New|Reused|SSL handshake has read"
|
||||
openssl s_client -connect $1:443 -servername $1 -bugs -no_ssl2 -no_ticket -sess_in /tmp/ssl_s </dev/null 2>/dev/null | grep -E "New|Reused|SSL handshake has read"
|
||||
echo "--------------------------------------------------------"
|
||||
|
||||
echo "####################### session ticket ######################"
|
||||
openssl s_client -connect $1:443 -servername $1 -bugs -no_ssl2 -sess_out /tmp/ssl_s </dev/null &>/dev/null
|
||||
echo "--------------------------------------------------------"
|
||||
openssl s_client -connect $1:443 -servername $1 -bugs -no_ssl2 -sess_in /tmp/ssl_s </dev/null 2>/dev/null| egrep "New|Reused|SSL handshake has read"
|
||||
openssl s_client -connect $1:443 -servername $1 -bugs -no_ssl2 -sess_in /tmp/ssl_s </dev/null 2>/dev/null | grep -E "New|Reused|SSL handshake has read"
|
||||
|
||||
echo
|
||||
|
||||
|
Reference in New Issue
Block a user