forked from leebaird/discover
-
Notifications
You must be signed in to change notification settings - Fork 0
/
multiTabs.sh
executable file
·95 lines (79 loc) · 1.7 KB
/
multiTabs.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#!/bin/bash
f_runlocally
clear
f_banner
echo -e "${BLUE}Open multiple tabs in Firefox with:${NC}"
echo
echo "1. List"
echo "2. Directories from robots.txt."
echo "3. Previous menu"
echo
echo -n "Choice: "
read choice
case $choice in
1) f_location
echo -n "Use a prefix? (y/N) "
read prefix
$web &
sleep 2
if [ -z $prefix ]; then
for i in $(cat $location); do
$web $i &
sleep 1
done
elif [ "$prefix" == "y" ]; then
for i in $(cat $location); do
$web https://$i &
sleep 1
done
else
f_error
fi
;;
2)
echo
echo $medium
echo
echo "Usage: target.com or target-IP"
echo
echo -n "Domain: "
read domain
# Check for no answer
if [[ -z $domain ]]; then
f_error
fi
wget -q $domain/robots.txt
# Check if the file is empty
if [ ! -s robots.txt ]; then
echo
echo -e "${RED}$medium${NC}"
echo
echo -e "${RED} *** No robots file discovered. ***${NC}"
echo
echo -e "${RED}$medium${NC}"
sleep 2
f_main
fi
grep 'Disallow' robots.txt | awk '{print $2}' > tmp
$web &
sleep 2
for i in $(cat tmp); do
$web http://$domain$i &
sleep 1
done
rm robots.txt
mv tmp $home/data/$domain-robots.txt
echo
echo $medium
echo
echo "***Scan complete.***"
echo
echo
echo -e "The new report is located at ${YELLOW}$home/data/$domain-robots.txt${NC}\n"
echo
echo
;;
3) f_main;;
*) f_error;;
esac
}