Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
#
# Usage: ./autoffuf.sh http://example.com
#
# (C) Jakub Żoczek
# https://twitter.com/zoczus
#####
url=$1
wordlist="/opt/common.txt"
for a in `seq 1 5` ; do
x=`head -c 6 /dev/urandom | base64 | sed -e 's/[+\/]//g'`
echo $x >> /tmp/random-words.txt
done
ffuf -u $url/FUZZ -w /tmp/random-words.txt -o /tmp/ffuf.txt -of csv -mc all > /dev/null
data=`cat /tmp/ffuf.txt | awk -F, '{ print $5 }' |sort | uniq | grep -v status`
if [ $data -eq "200" ]; then
data=`cat /tmp/ffuf.txt | awk -F, '{ print $6 }' | sort | uniq | grep -v content_length`
switch="-fs"
else
switch="-fc"
fi
ffuf -u $url/FUZZ -w $wordlist $switch $data
rm -f /tmp/random-words.txt
rm -f /tmp/fuzz.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.