This commit is contained in:
Cyberes 2024-03-30 20:28:59 -06:00
parent 503c40cad3
commit 037bc45467
1 changed files with 3 additions and 3 deletions

View File

@ -416,11 +416,11 @@ fi
BODY_CONTAINS=" " BODY_CONTAINS=" "
if [ -n "$CRIT_STRING" ]; then if [ -n "$CRIT_STRING" ]; then
BODY=$(curl -s $FOLLOW_REDIRECTS $INSECURE $HEADERS $RESOLVE $TIMEOUT $URL) BODY=$(curl -s $FOLLOW_REDIRECTS $INSECURE $HEADERS $RESOLVE $TIMEOUT $URL)
# shellcheck disable=SC2076
if ! [[ $BODY =~ "$CRIT_STRING" ]]; then
if $SANITIZE_HTML; then if $SANITIZE_HTML; then
BODY=$(echo "$BODY" | sed 's/</\&lt;/g' | sed 's/>/\&gt;/g') BODY=$(echo "$BODY" | sed 's/</\&lt;/g' | sed 's/>/\&gt;/g')
fi fi
# shellcheck disable=SC2076
if ! [[ $BODY =~ "$CRIT_STRING" ]]; then
echo "CRITICAL - response body does not contain the required string: $BODY" echo "CRITICAL - response body does not contain the required string: $BODY"
exit 2 exit 2
else else