From 3abdce195f7a8f9c33c0eb6464ca68c191e58e70 Mon Sep 17 00:00:00 2001 From: Cyberes Date: Mon, 18 Nov 2024 19:14:01 -0700 Subject: [PATCH] check_curl: fix special chars in crit string --- check_curl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_curl.sh b/check_curl.sh index de12195..4d38c14 100755 --- a/check_curl.sh +++ b/check_curl.sh @@ -443,7 +443,7 @@ fi BODY_CONTAINS="" if [ -n "$CRIT_STRING" ]; then BODY=$(curl -s $FOLLOW_REDIRECTS $INSECURE $HEADERS $RESOLVE $TIMEOUT $AUTHENTICATION "$URL") - if ! [[ $BODY =~ $CRIT_STRING ]]; then + if ! echo "$BODY" | grep -Fq "$CRIT_STRING"; then if $SANITIZE_HTML; then BODY=$(echo "$BODY" | sed 's//\>/g') fi