Last active
July 8, 2022 12:36
-
-
Save bing0o/07c04d7eb6ec6bf4002a3950d4a11a14 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 | |
usage() { | |
echo -e " | |
#Options: | |
-f, --file\t the domains list file | |
-t, --thread\t the threads number | |
-w, --wordlist\t the wordlist | |
-o, --output\t the output directory | |
#Example: | |
myffuf -f domains.txt -t 20 -w directory-list.txt -o ffuf-output | |
" | |
} | |
thread=40 | |
out="ffuf-results" | |
domains=False | |
wordlist=False | |
[ -z "$1" ] && { usage; exit 1; } | |
while [ -n "$1" ]; do | |
case "$1" in | |
-f|--file) | |
domains=$2 | |
shift;; | |
-t|--thread) | |
thread=$2 | |
shift;; | |
-w|--wordlist) | |
wordlist=$2 | |
shift;; | |
-o|--output) | |
out=$2 | |
shift;; | |
*|-h|--help) | |
usage; exit 1 ;; | |
esac | |
shift | |
done | |
[ -d "$out" ] || mkdir "$out" | |
[ "$domains" == False ] || [ "$wordlist" == False ] && { printf "[!] Arguments -f/--file and -w/--wordlist are required!"; exit 1; } | |
#cat $domains | xargs -Ilol bash -c "ffuf -c -u lol/FUZZ -t $thread -w $wordlist -o \"${lol##*/}\"" | |
lines=$(wc -l < $domains) | |
c=1 | |
while read domain; do | |
name=${domain##*/} | |
echo "[$c/$lines] $domain" | |
ffuf -c -u $domain/FUZZ -t $thread -w $wordlist -of csv -o $out/$name &>/dev/null | |
let c+=1 | |
done < $domains |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment