diag: dwc: Add detect JS-challenge

This commit is contained in:
remittor
2026-01-17 14:59:25 +03:00
parent 45974e191d
commit d91f44c287

View File

@@ -204,9 +204,15 @@ printf '%s\n' "$ZAP_TMP_DIR"/*.log | sort | while IFS= read -r file; do
res=100 res=100
fi fi
fi fi
if [ $res -lt 100 ] && [ -f "$FNAME.hdr" ] && [ $BODY_SIZE -eq 0 ]; then
if grep -q 'x-amzn-waf-action: challenge' "$FNAME.hdr"; then
status="WARN: tested site required JS-challenge"
res=999
fi
fi
printf '%12s / %-15s / %-13s: %s \n' "$TAG" "$IPADDR" "$PROVIDER" "$status" printf '%12s / %-15s / %-13s: %s \n' "$TAG" "$IPADDR" "$PROVIDER" "$status"
echo "$BODY_SIZE" > "$FNAME.size" echo "$BODY_SIZE" > "$FNAME.size"
if [ $res != 100 ]; then if [ $res -lt 100 ]; then
URL=$( cat "$FNAME.url" ) URL=$( cat "$FNAME.url" )
echo "$FILENAME : $URL" >> "$FAIL_URL_LIST" echo "$FILENAME : $URL" >> "$FAIL_URL_LIST"
fi fi