Skip to content

Commit

Permalink
Merge pull request #6 from theinfosecguy/dev_app
Browse files Browse the repository at this point in the history
QuickXSS v2.0.0
  • Loading branch information
theinfosecguy committed Mar 7, 2021
2 parents b678512 + 235ba2f commit 002633b
Showing 1 changed file with 100 additions and 13 deletions.
113 changes: 100 additions & 13 deletions QuickXSS.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,119 @@

set -e

echo -e "\e[1;31m
bold="\e[1m"
version="1.2.0"
red="\e[1;31m"
green="\e[32m"
blue="\e[34m"
cyan="\e[0;36m"
end="\e[0m"

echo -e "$cyan
██████╗ ██╗ ██╗██╗ ██████╗██╗ ██╗ ██╗ ██╗███████╗███████╗
██╔═══██╗██║ ██║██║██╔════╝██║ ██╔╝ ╚██╗██╔╝██╔════╝██╔════╝
██║ ██║██║ ██║██║██║ █████╔╝ ╚███╔╝ ███████╗███████╗
██║▄▄ ██║██║ ██║██║██║ ██╔═██╗ ██╔██╗ ╚════██║╚════██║
╚██████╔╝╚██████╔╝██║╚██████╗██║ ██╗ ██╔╝ ██╗███████║███████║
╚══▀▀═╝ ╚═════╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚═╝╚══════╝╚══════╝
\e[0m "
$end "

printf "$bold$blue ** Developed by theinfosecguy <3 ** \n\n$end"

contruct_mode(){
if [ -d "results" ]
then
cd results;
else
mkdir results;
cd results;
fi

echo -e "${green}Creating Directory for $1 ....$end";

if [ -d "$1" ]; then
printf "$red$1 Directory already exits. Please try again.\n\n$end";
exit 1;
fi

mkdir $1
cd $1

echo -e "\nFinding URLs for $domain using Waybackurls ...."

echo "$domain" | waybackurls | tee "$domain".txt >/dev/null 2>&1;
printf "URLS fetched using waybackurls & Stored in $blue$domain.txt$end"
printf "\n\nFinding URLs for $domain using gau ....\n"
echo "$1" | gau | tee -a $domain.txt >/dev/null 2>&1;
printf "URLS fetched using gau & appended in $blue$domain.txt$end \n\n"

echo -e "\nFinding valid URLs for XSS using GF Patterns \n"

echo -e "\n\n"
cat "$domain".txt | gf xss | sed 's/=.*/=/' | sed 's/URL: //' | tee "$domain"_temp_xss.txt >/dev/null 2>&1;

echo -e "\e[1;34mCreating Directory for $1 .... \e[0m"
sort "$domain"_temp_xss.txt | uniq | tee "$domain"_xss.txt >/dev/null 2>&1;
printf "\nXSS Vulnerable URL's added to $blue"$domain"_xss.txt$end\n\n"
}

mkdir $1
cd $1
usage(){
printf "QuickXSS Usage:\n\n"
printf "./QuickXSS.sh -d <target.com>\n"
printf "./QuickXSS.sh -d <target.com> -b <blindxss.xss.ht>\n"
printf "./QuickXSS.sh -d <target.com> -o xss_results.txt \n"
printf "./QuickXSS.sh -d <target.com> -b <blindxss.xss.ht> -o xss_results.txt\n\n"
exit 1;
}

echo -e "\e[1;34m\nFinding URLs for $1 .... \n \e[0m"
missing_arg(){
echo -e "${red}${bold}Missing Argument $1$end\n";
usage;
}

echo "$1" | waybackurls | tee $1.txt
# Handling user arguments
while [ -n "$1" ]; do
case $1 in
-d|--domain)
domain=$2
shift ;;
-b|--blind)
blind=$2
shift
;;
-o| --output)
out=$2
shift
;;
-h|--help)
usage
;;
-v|--version)
echo "Version of QuickXSS: $version"
exit 0 ;;
*)
echo "[-] Unknown Option: $1"
usage ;;
esac
shift
done

echo -e "\e[1;31m\nFinding valid URLs for XSS \n \e[0m"
# Creating Dir and fetch urls for a domain
[[ $domain ]] && contruct_mode "$domain" || missing_arg "-d";

cat $1.txt | gf xss | sed 's/=.*/=/' | sed 's/URL: //' | tee $1_temp_xss.txt
# Check if Results Argument is present or not.
if [ -z "$out" ]
then
out="results.txt"
printf "No Output File selected, Results will be stored in $out\n"
fi

sort $1_temp_xss.txt | uniq | tee $1_xss.txt
# STart XSS Hunting by checking if Blind XSS payload is present or not.
if [ -z "$blind" ] ; then
echo "XSS Automation Started using Dalfox.."
dalfox file $domain_xss.txt -o $out
else
echo "XSS Automation Started using Dalfox with your Blind Payload.."
dalfox file "$domain"_xss.txt -b $blind -o $out
fi

dalfox file $1_xss.txt pipe -b $2
# Final Result
echo -e "XSS automation completed, Results stored in$blue results/$domain ${end}Directory"

0 comments on commit 002633b

Please sign in to comment.