-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsubs_finder.sh
More file actions
executable file
·60 lines (45 loc) · 1.23 KB
/
subs_finder.sh
File metadata and controls
executable file
·60 lines (45 loc) · 1.23 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
#!/bin/sh
domain=$1
threads=$2
if [ -z "$1" ];then
echo "[!] Es necesario agregar un dominio.";
exit 1
fi
if [ -z "$2" ];then
echo "[!] Es necesario especificar el No. de threads."
exit 1
fi
sublister=$(locate sublist3r.py)
if ! [ "$sublister" ]; then
echo "[!] No se encontro Sublist3r instalado.";
exit 1
fi
assetfinder=$(which assetfinder)
if ! [ "$assetfinder" ]; then
echo "[!] No se encontro assetfinder instalado.";
exit 1
fi
subfinder=$(which subfinder)
if ! [ "$subfinder" ]; then
echo "[!] No se encontro subfinder instalado.";
exit 1
fi
mkdir $1
$sublister -d $1 -t $2 -o $1/from_sublister.txt
echo "[+] Buscando subdominios de $1 con assetfinder"
$assetfinder --subs-only $1 > $1/fromassetfinder.txt
echo "[+] Buscando subdominios de $1 con subfinder"
$subfinder -d $1 -t $2 > $1/fromsubfinder.txt
cat $1/*.txt > $1/subs_collection.txt
rm -rf $1/from*
sort -u $1/subs_collection.txt -o $1/$1_subs_not_probed.txt
httprobe=$(which httprobe)
if ! [ "$httprobe" ]; then
echo "[!] No se encontro httprobe instalado.";
echo "[+] Guardando subdominios sin confirmar si responden."
exit 1
fi
echo "[+] Probando respuestas de subdominios."
cat $1/$1_subs_not_probed.txt | httprobe c 10 > $1_live_subs.txt
rm -rf $1
echo "[+] Finalizado."