-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscd.sh
57 lines (44 loc) · 1.89 KB
/
scd.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
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
echo '''
┌─┐┬┌┬┐┌─┐┬ ┌─┐ ╔╦╗╔╗╔╔═╗ ┬─┐┌─┐┌─┐┌─┐┌┐┌
└─┐││││├─┘│ ├┤ ║║║║║╚═╗ ├┬┘├┤ │ │ ││││
└─┘┴┴ ┴┴ ┴─┘└─┘ ═╩╝╝╚╝╚═╝ ┴└─└─┘└─┘└─┘┘└┘ContentDiscovery
'''
###tools
crawler=/opt/recon/crawler/crawler.py #github.com/ghostlulzhacks/crawler
waybackMachine=/opt/recon/waybackMachine/waybackMachine.py #github.com/ghostlulzhacks/waybackMachine
cc=/opt/recon/commoncrawl/cc.py #github.com/ghostlulzhacks/commoncrawl
gobuster=gobuster
jsearch=/opt/recon/jsearch/jsearch.py #github.com/incogbyte/jsearch
linkfinder=/opt/recon/LinkFinder/linkfinder.py #github.com/GerbenJavado/LinkFinder
###config
file=$1
cl=3 #crawling level
#regx=github.com/incogbyte/jsearch/blob/master/regex_modules/regex_modules.py
wordlist=/usr/share/wordlists/dirbuster/directory-list-2.3-big.txt
function ContentDiscovery {
domain=$(sed -e 's|^[^/]*//||' <<< $1)
#1-self-crawl
crawled=$(python3 $crawler -d $1 -l $cl | cut -f2)
#2-wayback-machine
wayback=$(python $waybackMachine $1 | grep $domain)
#3-common-crawl-data
cocr=$(python $cc -d $domain)
#4-directory-brute-force
directories=$(gobuster dir -k -q -w $wordlist -u $1 | awk -v url=$1 '{print url$1}')
#jssearch
output=$(python3 $jsearch -u $1 -n $domain)
jslinks=$(echo "$output" | grep -F '[DOMAIN INFO]' | awk '{print $3}')
jsfiles=$(echo "$output" | grep $domain | grep .js | awk '{print $5}')
rm -r $domain
}
function main {
while IFS= read -r line
do
ContentDiscovery "$line"
allurls=$(echo "$crawled$wayback$cocr$directories$jslinks" | sort -u)
echo "$allurls" >> "scd-urls.txt"
echo "$jsfiles" >> "scd-js.txt"
done <"$file"
}
main