-
Notifications
You must be signed in to change notification settings - Fork 0
/
wfuzzer.sh
47 lines (38 loc) · 1.13 KB
/
wfuzzer.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
# Usage:
# wfuzzer.sh https://example.com
# wfuzzer.sh https://example.com/adirectory
# Note that there is no trailing /
# Outputs to ~/.wfuzz/output as md5 filenames
# Look at ~/.wfuzz/output/log.txt which file is what
url="$1/FUZZ{notthere}"
echo $url
dir=~/.wfuzz
out=$dir/output
mkdir $out 2>/dev/null
log=$out/log.txt
echo >> $log
cp $dir/disc $dir/disc1
sed -i "s,REP,$url," $dir/disc1
logstr=disc,$url
md5=$(echo -n $logstr | md5sum | cut -d" " -f1)
echo $(date) $logstr $md5 >> $log
wfuzz --recipe $dir/disc1 --oF $out/$md5 2>/dev/null
rm $dir/disc1
echo ""
cp $dir/recurse $dir/recurse1
sed -i "s,REP,$url," $dir/recurse1
logstr=recurse,$url
md5=$(echo -n $logstr | md5sum | cut -d" " -f1)
echo $(date) $logstr $md5 >> $log
wfuzz --recipe $dir/recurse1 --oF $out/$md5 2>/dev/null
rm $dir/recurse1
echo ""
cp $dir/extension $dir/extension1
url2=$(echo -n $url | sed "s,FUZZ{notthere},FUZZ{notthere}.FUZ2Z{no},")
sed -i "s,REP,$url2," $dir/extension1
logstr=extension,$url2
md5=$(echo -n $logstr | md5sum | cut -d" " -f1)
echo $(date) $logstr $md5 >> $log
wfuzz --recipe $dir/extension1 --oF $out/$md5 2>/dev/null
rm $dir/extension1