Skip to content

Instantly share code, notes, and snippets.

@ipk1
Forked from ZoczuS/autoffuf.sh
Created August 28, 2020 11:51
Show Gist options
  • Save ipk1/0d3b6a7b8c6abc09f933100504ddcc4b to your computer and use it in GitHub Desktop.
Save ipk1/0d3b6a7b8c6abc09f933100504ddcc4b 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