-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMain.sh
More file actions
77 lines (63 loc) · 1.76 KB
/
Main.sh
File metadata and controls
77 lines (63 loc) · 1.76 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/bin/bash
domain=$1
RED="\033[1;31m"
RESET="\033[0m"
subdomain_path=$domain/subdomains
screenshot_path=$domain/screenshots
scan_path=$domain/scans
if [ ! -d "$domain" ]; then
mkdir $domain
fi
if [ ! -d "$subdomain_path" ]; then
mkdir $domain
fi
if [ ! -d "$screenshot_path" ]; then
mkdir $domain
fi
if [ ! -d "$scan_path" ]; then
mkdir $domain
fi
#Subfinder function
function subfinder {
echo -e "${RED} [+] Launching subfinder ... ${RESET}"
subfinder -d $domain > $subdomain_path/found.txt
}
subfinder
#assetfinder function
function assetfinder {
echo -e "${RED} [+] Launching assetfinder ... ${RESET}"
assetfinder $domain | grep $domain >> $subdomain_path/found.txt
}
assetfinder
#amass function
function amass {
sudo apt-get install amass -y
echo -e "${RED} [+] Launching amass ... ${RESET}"
amass enum -d $domain >> $subdomain_path/found.txt
}
amass
#httpprobe function
function httpprobe {
echo -e "${RED} [+] Finding alive subdomains ... ${RESET}"
cat $subdomain_path/found.txt | grep $domain | sort -u | httpprobe -prefer-https | grep https | sed 's/https\?:\///' | tee -a $subdomain_path/alive.txt
}
httpprobe
#gowitness function
function gowitness {
sudo apt-get install gowitness -y
echo -e "${RED} [+] Taking screenshots of alive subdomains ... ${RESET}"
gowitness file -f $subdomain_path/alive.txt -P $screenshot_path/ --no-http
}
gowitness
#nmap function
function nmap {
echo -e "${RED} [+] Running nmap on alive subdomains ... ${RESET}"
nmap -iL $subdomain_path/alive.txt -T4 -A -p- -oN $scan_path/nmap.txt
}
nmap
#nikto function
function nikto {
echo -e"${RED} [+] Running nikto on alive subdomains ...${RESET}"
nikto -h $subdomain_path/alive.txt $scan_path/nikto.txt
}
nikto