Skip to content

Instantly share code, notes, and snippets.

@ZoczuS
Created June 12, 2020 01:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save ZoczuS/d4427424f7906464a6a930f6aa2a2c5e to your computer and use it in GitHub Desktop.
Save ZoczuS/d4427424f7906464a6a930f6aa2a2c5e to your computer and use it in GitHub Desktop.
#!/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