├── LazyXSS.sh ├── README.md ├── install.sh └── screenshot-lazyxss.png /LazyXSS.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export PATH="$PATH:$HOME/go/bin" 4 | 5 | 6 | # flags 7 | 8 | while getopts a:t:p:x:h flag 9 | do 10 | case "${flag}" in 11 | a) attack=${OPTARG};; 12 | t) target=${OPTARG};; 13 | p) ports=${OPTARG};; 14 | x) custom=${OPTARG};; 15 | h) help=${OPT};; 16 | *) echo "Invalid option: -$flag" ;; 17 | esac 18 | 19 | 20 | done 21 | 22 | trap ctrl_c INT 23 | 24 | 25 | function rm_tmp () { 26 | 27 | if [ -f /tmp/probes.tmp ];then rm -f /tmp/probes.tmp;fi 28 | if [ -f /tmp/probes.tmp ];then rm -f /tmp/gau.tmp;fi 29 | if [ -f /tmp/url-path.tmp ];then rm -f /tmp/url-path.tmp;fi 30 | 31 | } 32 | 33 | function ctrl_c(){ 34 | echo -e "\n\n\n${red}Made${end} in ${blue}Do${end}" 35 | rm_tmp 36 | exit 0 37 | } 38 | 39 | ## VARS 40 | probe_temp="/tmp/probes.tmp" 41 | gau_temp="/tmp/gau.tmp" 42 | 43 | if [ "$custom" ] 44 | then 45 | xss_payload=$custom 46 | reflect=$custom 47 | else 48 | xss_payload='">' 49 | reflect="" 50 | 51 | fi 52 | 53 | 54 | ## Colors 55 | end="\033[0m\e[0m" 56 | red="\e[0;31m\033[1m" 57 | blue="\e[0;34m\033[1m" 58 | yellow="\e[0;33m\033[1m" 59 | purple="\e[0;35m\033[1m" 60 | 61 | 62 | ## banner 63 | 64 | ## Get your current IP 65 | function ip () { 66 | IP=$(curl -s ifconfig.me) 67 | cntry=$(whois $IP|grep country|awk -F ":" '{print $2}'|tr -d ' ') 68 | 69 | echo -e "\n${blue}Your IP is:${end} ${yellow}$IP${end} ${red}$cntry${end}" 70 | } 71 | 72 | ## Get your IP ? 73 | # ip 2>/dev/null 74 | 75 | echo -e "${purple} 76 | 77 | ██▓ ▄▄▄ ▒███████▒▓██ ██▓▒██ ██▒ ██████ ██████ 78 | ▓██▒ ▒████▄ ▒ ▒ ▒ ▄▀░ ▒██ ██▒▒▒ █ █ ▒░▒██ ▒ ▒██ ▒ 79 | ▒██░ ▒██ ▀█▄ ░ ▒ ▄▀▒░ ▒██ ██░░░ █ ░░ ▓██▄ ░ ▓██▄ 80 | ▒██░ ░██▄▄▄▄██ ▄▀▒ ░ ░ ▐██▓░ ░ █ █ ▒ ▒ ██▒ ▒ ██▒ 81 | ░██████▒▓█ ▓██▒▒███████▒ ░ ██▒▓░▒██▒ ▒██▒▒██████▒▒▒██████▒▒ 82 | ░ ▒░▓ ░▒▒ ▓▒█░░▒▒ ▓░▒░▒ ██▒▒▒ ▒▒ ░ ░▓ ░▒ ▒▓▒ ▒ ░▒ ▒▓▒ ▒ ░ 83 | ░ ░ ▒ ░ ▒ ▒▒ ░░░▒ ▒ ░ ▒ ▓██ ░▒░ ░░ ░▒ ░░ ░▒ ░ ░░ ░▒ ░ ░ 84 | ░ ░ ░ ▒ ░ ░ ░ ░ ░ ▒ ▒ ░░ ░ ░ ░ ░ ░ ░ ░ ░ 85 | ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ 86 | ░ ░ ░ 87 | 88 | By Filiplain 89 | ${end} 90 | " 91 | 92 | 93 | 94 | ## Help Panel 95 | 96 | function help_panel () { 97 | 98 | 99 | 100 | echo -e " 101 | 102 | -a) Set attack number (1,2,3,4): 103 | 1) Try finding XSS in parameters on Given URL or list of URLs in a File. 104 | 2) Try finding XSS in PATHs on Given URL or list of URLs in a File. 105 | 3) Probe given domain or domains in a file, Crawls the alive URLs and then try to find possible XSS on Parameters. 106 | eg: -a 3 107 | 4) Fetch URLs of target domain and try to find possible XSS on Parameters. 108 | eg: -a 4 109 | 110 | -t) Set target giving a URL/domain or a list in a file depending on the attack type. 111 | eg: -t ./url-list.txt 112 | eg: -t http://vulnpage.test 113 | 114 | 115 | -p) [When using attack #3 only] Set ports to probe (defaults 80,443). 116 | eg: -p 8000,8080,8085,10443 117 | 118 | -x) [OPTIONAL] Custom XSS Payload (Default: '\">)' 119 | eg: -x '\">