Last active
March 20, 2024 15:08
-
-
Save KathanP19/9c1a8a322ada7b40462caf6897687cce to your computer and use it in GitHub Desktop.
Find DomXSS using pattern in jsfile.
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
#!/bin/bash | |
#This code is taken from https://github.com/dwisiswant0/findom-xss Do check it out. | |
PATTERN="(document|location|window)\.(URL|documentURI|search|hash|referrer|(location\.)?href|name)" | |
BODY=$(curl -sL ${1}) | |
SCAN=($(echo ${BODY} | grep -Eoin ${PATTERN})) | |
if [[ ! -z "${SCAN}" ]]; then | |
echo -en "---\n\033[0;32m[!] ${1}\033[0m\n${SCAN}\n" | |
echo -e "---\n${1}\n${SCAN}" >> domxss_scan.txt | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment