Skip to content

Instantly share code, notes, and snippets.

@hahwul
Created August 22, 2024 11:58
Show Gist options
  • Save hahwul/06b91f241d8f3153d554f93b6b1c3af2 to your computer and use it in GitHub Desktop.
Save hahwul/06b91f241d8f3153d554f93b6b1c3af2 to your computer and use it in GitHub Desktop.
#!/bin/bash
URL="https://pocs.hahwul.com/xss.js" # Target
NEW_FILE="new_body.txt"
OLD_FILE="old_body.txt"
wget -qO- "$URL" > "$NEW_FILE"
if [ -f "$OLD_FILE" ]; then
if ! diff -q "$OLD_FILE" "$NEW_FILE" > /dev/null; then
echo "Changed!"
diff "$OLD_FILE" "$NEW_FILE"
fi
fi
mv "$NEW_FILE" "$OLD_FILE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment