Skip to content

Instantly share code, notes, and snippets.

@OffXec
Last active April 29, 2021 20:41
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 OffXec/d00f94a5ada912f864bba72fe2746f03 to your computer and use it in GitHub Desktop.
Save OffXec/d00f94a5ada912f864bba72fe2746f03 to your computer and use it in GitHub Desktop.
Work in progress - XSSWingman automation
#!/bin/bash
u=$1
p="HEY_XSS_HERE"
filename=""
load_file=false
red="\033[31;40m"
none="\033[0m"
urls=0
function txt_check() {
load_file=true
while read -r line; do
if (curl -s ${line//=/=$p} | grep $p); then
((urls=urls+1))
echo -e $red"[+]"$none $line "is REFLECTIVE!"$none
else
echo -e $red"[+]"$none $line" is "$red"NOT REFLECTIVE!"$none
fi
done < "$u"
if (len urls >= 0); then
echo -e $red"[+]"$none"there are" $urls$red" REFLECTIVE."$none" URLS."$red" Passing on to Wingman"$none
./wingman -l urls
else
echo -e $red"[+]"$none"there are" $urls$red" REFLECTIVE."$none"
fi
}
function reflective_check() {
if (curl -s ${u//=/=$p} | grep $p); then
echo -e $red"[+]"$none $u "is REFLECTIVE!"$none
else
echo -e $red"[+]"$none $u" is "$red"NOT REFLECTIVE!"$none
fi
}
function runner() {
if [[ $u == *".txt"* ]]; then
echo -e $red" Domain list detected, checking list for reflective URLS.."
txt_check
fi
if [[ $u == *"https"* || *"http"* ]]; then
if reflective_check $u; then
./wingman -u $u --crawl --progress
echo -e $red"Wingman Proccess: Completed. Results, if any, are above!"$none
fi
fi
}
runner
@ratnadip1998
Copy link

Hello I just ran this script but not working....

Error :
wing.sh: line 42: unexpected EOF while looking for matching `"'
wing.sh: line 47: syntax error: unexpected end of file

i think i am doing something wrong may be.. IDK...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment