Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save incogbyte/b03f7794a8e2d2e854bb1539d8c64d51 to your computer and use it in GitHub Desktop.
Save incogbyte/b03f7794a8e2d2e854bb1539d8c64d51 to your computer and use it in GitHub Desktop.
FFUF list of urls and save them into a file by name of the domains
#!/bin/bash
## Author: incogbyte
## Usage: ./ffuf_script.sh input.txt
extract_domain() {
echo "$1" | awk -F/ '{print $3}'
}
if [ "$#" -eq 0 ]; then
echo "Please provide the input file containing URLs."
exit 1
fi
input_file="$1"
results_folder="ffuf_results"
mkdir -p "$results_folder"
while IFS= read -r url; do
domain=$(extract_domain "$url")
domain_folder="$results_folder/$domain"
mkdir -p "$domain_folder"
ffuf -u "$url" -o "$domain_folder/ffuf.txt" -w /root/wordlists/fuzz.txt -mc 200 -s -sf
done < "$input_file"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment