-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.sh
62 lines (38 loc) · 1.05 KB
/
script.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
58
59
60
61
62
#!/usr/bin/bash
echo 'Starting script...'
domain=$1
echo '[+] Finding subdomains for' $domain
echo
subfinder -silent -d $domain > raw_result.txt
echo '[-] Subfinder done'
echo
echo '[+] Domains recognition for' $domain
echo
findomain --quiet -t $domain >> raw_result.txt
echo '[-] Find domain done'
echo
cat raw_result.txt | sort -u > results
sed -i '/^$/d' results
rm raw_result.txt
echo
for i in $(cat results); do
if ping -c 1 $i &> /dev/null; then
echo $i >> targets
fi
done
rm results
echo '[+] Checking for alive domains'
echo
# FAZER 2 LISTAS, UMA PRO NUCLEI E OUTRA PRO NMAP, O NUCLEI PRECISA DO PROTOCOLO HTTP, O NMAP NÃO
httpx --list targets | awk '{print $1}'
echo "[*] Total domains found in $domain: $(wc -l targets | awk '{print $1}')"
echo
echo "[+] Starting nmap banner scan"
while read aux; do
nmap --append-output -oN nmap_output -sS -p 80 $aux | tee
done < targets
while read aux; do
nuclei -u $aux >> nuclei_output | tee
done < targets
echo "[-] Nmap banner scan done, see the results at banners"
echo 'Done'