-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathscan.sh
More file actions
193 lines (165 loc) · 3.35 KB
/
Copy pathscan.sh
File metadata and controls
193 lines (165 loc) · 3.35 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
#!/bin/bash
Green=$'\e[1;32m'
echo"" "$Green"
banner() {
cat pickleban.txt
}
menu() {
echo '1. Whois Lookup'
echo '2. DNS Lookup + Cloudflare Detector'
echo '3. Zone Transfer'
echo '4. Port Scan'
echo '5. HTTP Header Grabber'
echo '6. Honeypot Detector'
echo '7. Robots.txt Scanner'
echo '8. Link Grabber'
echo '9. IP Location Finder'
echo '10. Traceroute'
echo '11. Domain-to-IP Lookup'
echo '12. Exit program'
}
scan1() {
read -p 'pickle> ' choice
case "$choice" in
'1')
read -rp 'Enter a domain or IP address: ' target
whois="http://api.hackertarget.com/whois/?q=$target"
curl --silent "$whois"
display
;;
'2')
read -rp 'Enter a domain: ' target
dns="http://api.hackertarget.com/dnslookup/?q=$target"
curl --silent "$dns"
echo
if [[ "$dns" == *cloudflare* ]]; then
echo 'Cloudflare detected'
else
echo "$target is *not* protected by Cloudflare"
fi
display
;;
# '3' is a work in progress
'3')
read -rp 'Enter a domain: ' domain
zone="http://api.hackertarget.com/zonetransfer/?q=$domain"
curl --silent "$zone"
display
;;
'4')
read -rp 'Enter a domain or IP address: ' target
ports="http://api.hackertarget.com/nmap/?q=$target"
curl --silent "$ports"
display
;;
'5')
read -rp 'Enter a domain or IP address: ' target
header="http://api.hackertarget.com/httpheaders/?q=$target"
curl --silent "$header"
display
;;
'6')
read -rp 'Enter IP address: ' target
honey="https://api.shodan.io/labs/honeyscore/$target?key="
phoney=$(curl --silent "$honey")
case "$phoney" in
'0.0')
echo 'Honeypot Probability: 0%'
;;
'0.1')
echo 'Honeypot Probability: 10%'
;;
'0.2')
echo 'Honeypot Probability: 20%'
;;
'0.3')
echo 'Honeypot Probabilty: 30%'
;;
'0.4')
echo 'Honeypot Probabilty: 40%'
;;
'0.5')
echo 'Honeypot Probability: 50%'
;;
'0.6')
echo 'Honeypot Probability: 60%'
;;
'0.7')
echo 'Honeypot Probabilty: 70%'
;;
'0.8')
echo 'Honeypot Probability: 80%'
;;
'0.9')
echo 'Honeypot Probabilty: 90%'
;;
'1.0')
echo 'Honeypot Probabilty: 100%'
;;
esac
display
;;
'7')
read -p 'This feature makes a direct call to the target -- would you like to continue? [Y/n] ' answer
if [[ "$answer" = 'y' ]]; then
read -rp 'Enter domain (without protocol): ' target
robot="http://$target/robots.txt"
curl --silent "$robot"
display
elif [[ "$answer" = 'n' ]]; then
echo 'Going back to menu...'
display
else
echo 'Your choice is invalid.'
display
fi
;;
'8')
read -rp 'Enter URL (without protocol): ' target
page="https://api.hackertarget.com/pagelinks/?q=http://$target"
curl --silent "$page"
display
;;
'9')
read -rp 'Enter IP address: ' target
geo="http://ipinfo.io/$target/geo"
curl --silent "$geo"
display
;;
'10')
read -rp 'Enter a domain or IP address: ' target
trace="https://api.hackertarget.com/mtr/?q=$target"
curl --silent "$trace"
display
;;
'11')
read -p 'Enter a domain: ' target
if [ -x "$(command -v dig)" ]; then
echo "$target's IP address is" $(dig +short "$target")
else
echo 'The dig CLI tool is required for this feature. Going back to menu.'
fi
display
;;
\
'12')
echo 'Bye'
exit 0
;;
*)
echo 'Your choice is invalid.'
display
;;
esac
}
display() {
echo
menu
echo
scan1
}
banner
echo ""
menu
echo
scan1