Created
July 6, 2020 15:27
-
-
Save bing0o/af254d6c6e7bc9d8c2c3701872810db5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
| PUT() { | |
| curl -sk -XPUT "$1/bing0o.txt" -H "User-Agent: Mozilla/5.0" -d "bing0o Haxor PUT method" &>/dev/null | |
| res=$(curl -sk "$1/bing0o.txt") | |
| if [[ "$res" =~ "bing0o Haxor PUT method" ]] | |
| then | |
| echo "Vulnerable: $1/bing0o.txt" | tee -a "$2" | |
| fi | |
| } | |
| Usage(){ | |
| while read -r line; do | |
| printf "%b\n" "$line" | |
| done <<-EOF | |
| \r$PRG:\t\t - Tool reads a list of Domanis or IPs and gives you: status code, size, redirected link and the Title. | |
| \r | |
| \rOptions: | |
| \r -l, --list - List of Domains or IPs. | |
| \r -t, --Threads - Threads number (Default: 5). | |
| \r -o, --output - The output file to save the results. | |
| \r -h, --help - Displays this Informations and Exit. | |
| \r -v, --version - Displays The Version | |
| \rExample: | |
| \r $PRG -l domains.txt -t 20 -o vulnerable.txt | |
| \r | |
| EOF | |
| } | |
| list=False | |
| thread=10 | |
| out="put-vuln.txt" | |
| while [ -n "$1" ]; do | |
| case $1 in | |
| -l|--list) | |
| list=$2 | |
| shift ;; | |
| -t|--thread) | |
| thread=$2 | |
| shift ;; | |
| -o|--out) | |
| out=$2 | |
| shift ;; | |
| -h|--help) | |
| Usage | |
| exit ;; | |
| *) | |
| echo "[!] Unknown Option: $1" | |
| Usage; exit 1 ;; | |
| esac | |
| shift | |
| done | |
| main(){ | |
| cat $list | xargs -I{} -P $thread bash -c "PUT '{}' '$out'" | |
| } | |
| [ "$list" == False ] && { | |
| echo "[!] Argument -l/--list is Required!" | |
| Usage | |
| exit 1 | |
| } || { | |
| export -f PUT | |
| main | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment