-
Notifications
You must be signed in to change notification settings - Fork 36
/
dorkify.py
313 lines (242 loc) · 8.77 KB
/
dorkify.py
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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import argparse
import core.search_url as search_url
import core.logo as logo
import core.colors as colors
import core.mods as mods
import Modules.wordpress as wp
import Modules.information as info
import Modules.userpass as up
import Modules.cameras as cam
import Modules.ftp as ftp
parser = argparse.ArgumentParser()
ap = parser.add_mutually_exclusive_group()
ap.add_argument('--cli', help='Run the Command Line version of Dorkify', action='store_true')
ap.add_argument('--wp', help='WordPress sites vulnerabilities', action='store_true')
ap.add_argument('--up', help='Find vulnerable Usernames and Passwords', action='store_true')
ap.add_argument('--cam', help='Find vulnerable CCTV cameras', action='store_true')
ap.add_argument('--ftp', help='Find open FTP Servers', action='store_true')
ap.add_argument('-v', '--version', help='Version', action="version", version='2.01')
ap.add_argument('-s', '--search', type=str, help='Do a Google search')
ap.add_argument('-b', '--book', type=str, help='Search for a book or author')
ap.add_argument('-mu', '--music', type=str, help='Search for songs or artists')
ap.add_argument('-m', '--maps', type=str, help='Find maps of a city')
ap.add_argument('-w', '--weather', type=str, help='Check weather of a city')
ap.add_argument('-i', '--info', type=str, help='Get Information')
ap.add_argument('-d', '--define', type=str, help='Define a term')
ap.add_argument('-st', '--stocks', type=str, help='Search for Stock of a company with Ticker value')
ap.add_argument('--intitle', type=str, help='Search for a keywords in website title')
ap.add_argument('--inurl', type=str, help='Search for a keywords in website URL')
ap.add_argument('--site', type=str, help='Search for a Site')
args = vars(parser.parse_args())
notice = f'''
{colors.bcolors.OKBLUE}Please read the following information carefully before using this tool.
The content of the this repository is for educational purposes and uses only.
Do not use this tool excessively. Google Dorking might be legal but using the
functionality for cyber terrorism, cyber thefts and other malicious activities is illegal.
Using this tool is not anonymous and one needs to be aware that Google knows who you are
and from where and when you perform these searches.{colors.bcolors.ENDC}
{colors.bcolors.RED}DO YOU AGREE TO TO OUR TERMS AND CONDITIONS ?{colors.bcolors.ENDC} (Y / N) :
'''
def url_menu():
global ch2
mods.clear_screen()
logo.dorkify_logo()
print(f'''
CHOOSE OPTION :
{colors.bcolors.OKBLUE}[~]{colors.bcolors.ENDC} Find with specific terms in website titles [1]
{colors.bcolors.OKBLUE}[~]{colors.bcolors.ENDC} Find with specific terms in website URL's [2]
{colors.bcolors.OKBLUE}[~]{colors.bcolors.ENDC} Find Website [3]
''')
ch2 = int(input(" --> "))
print('\n\n')
def hacking_menu():
global ch6
mods.clear_screen()
logo.dorkify_logo()
print(f'''
CHOOSE OPTION :
{colors.bcolors.OKBLUE}[~]{colors.bcolors.ENDC} Wordpress Site Dorks [1]
{colors.bcolors.OKBLUE}[~]{colors.bcolors.ENDC} Find WordPress websites that are running the Wordfence WAF [2]
{colors.bcolors.OKBLUE}[~]{colors.bcolors.ENDC} Find vulnerable Usernames and Passwords [3]
{colors.bcolors.OKBLUE}[~]{colors.bcolors.ENDC} Find vulnerable CCTV cameras [4]
{colors.bcolors.OKBLUE}[~]{colors.bcolors.ENDC} Find vulnerable Web Servers [5]
{colors.bcolors.OKBLUE}[~]{colors.bcolors.ENDC} Search for Log files [6]
{colors.bcolors.OKBLUE}[~]{colors.bcolors.ENDC} Find open FTP Servers [7]
''')
ch6 = int(input(" --> "))
print('\n\n')
def dorkify_menu():
global ch
mods.clear_screen()
logo.dorkify_logo()
print(f'''
CHOOSE OPTION :
{colors.bcolors.OKBLUE}[~]{colors.bcolors.ENDC} Google Search [1]
{colors.bcolors.OKBLUE}[~]{colors.bcolors.ENDC} URL Search [2]
{colors.bcolors.OKBLUE}[~]{colors.bcolors.ENDC} Books [3]
{colors.bcolors.OKBLUE}[~]{colors.bcolors.ENDC} Music Downloads [4]
{colors.bcolors.OKBLUE}[~]{colors.bcolors.ENDC} Information [5]
{colors.bcolors.OKBLUE}[~]{colors.bcolors.ENDC} Dork Hacks! [6]
''')
ch = int(input(" --> "))
print('\n\n')
# WordPress
if args['wp']:
logo.dorkify_logo()
print(notice)
yn = input()
if yn == 'y' or yn =='Y':
wp.wordpress()
else :
print('YOU MUST AGREE TO THE TERMS')
sys.exit()
# Username & Passwords
if args['up']:
logo.dorkify_logo()
print(notice)
yn = input()
if yn == 'y' or yn =='Y':
up.userpass()
else :
print('YOU MUST AGREE TO THE TERMS')
sys.exit()
# Cameras
if args['cam']:
logo.dorkify_logo()
print(notice)
yn = input()
if yn == 'y' or yn =='Y':
cam.cameras()
else :
print('YOU MUST AGREE TO THE TERMS')
sys.exit()
# FTP Server
if args['ftp']:
logo.dorkify_logo()
print(notice)
yn = input()
if yn == 'y' or yn =='Y':
ftp.ftp()
else :
print('YOU MUST AGREE TO THE TERMS')
sys.exit()
# Main Program
if args['cli']:
logo.dorkify_logo()
print(notice)
yn = input()
if yn == 'y' or yn =='Y':
dorkify_menu()
else :
print('YOU MUST AGREE TO THE TERMS')
sys.exit()
if ch == 1:
q = input('SEARCH : ')
print('\n Performing Google Search\n')
search_url.url_search(q)
elif ch == 2:
url_menu()
if ch2 == 1:
s = input('SEARCH : ')
q = str('intitle:' + s)
print('\nSearching... \n')
search_url.url_search(q)
elif ch2 == 2:
s = input('SEARCH : ')
q = str('inurl:' + s)
print('\nSearching... \n')
search_url.url_search(q)
elif ch2 == 3:
s = input('SEARCH : ')
q = str('site:' + s)
print('\nSearching... \n')
search_url.url_search(q)
else:
print('INVALID OPTION \n TRY AGAIN')
sys.exit()
elif ch == 3:
s = input('SEARCH BOOKS/AUTHORS: ')
q = str('book:' + s)
print('\nSearching Books: \n')
search_url.url_search(q)
elif ch == 4:
s = input('SEARCH SONGS/ARTISTS: ')
q = str('?intitle:index.of?mp3 ' + s)
print('\nSearching Songs: \n')
search_url.url_search(q)
elif ch == 5:
info.information()
elif ch == 6:
hacking_menu()
if ch6 == 1:
wp.wordpress()
elif ch6 == 2:
q = str('filetype:ini “wordfence”')
print('\nSearching... \n')
search_url.url_search(q)
elif ch6 == 3:
up.userpass()
elif ch6 == 4:
cam.cameras()
elif ch6 == 5:
q = str('inurl:/proc/self/cwd')
print('\nSearching... \n')
search_url.url_search(q)
elif ch6 == 6:
q = str('allintext:username filetype:log')
print('\nSearching... \n')
search_url.url_search(q)
elif ch6 == 7:
ftp.ftp()
else:
print('INVALID OPTION : ')
sys.exit()
else:
print('INVALID OPTION! \n EXITING ')
sys.exit()
if args['search'] is not None:
logo.dorkify_logo()
search_url.url_search(args['search'])
if args['book'] is not None:
logo.dorkify_logo()
q = str('book:' + args['book'])
search_url.url_search(q)
if args['intitle'] is not None:
logo.dorkify_logo()
q = str('intitle:' + args['intitle'])
search_url.url_search(q)
if args['inurl'] is not None:
logo.dorkify_logo()
q = str('inurl:' + args['inurl'])
search_url.url_search(q)
if args['site'] is not None:
logo.dorkify_logo()
q = str('site:' + args['site'])
search_url.url_search(q)
if args['music'] is not None:
logo.dorkify_logo()
q = str('?intitle:index.of?mp3 ' + args['music'])
search_url.url_search(q)
if args['stocks'] is not None:
logo.dorkify_logo()
q = str('stocks' + args['stocks'])
search_url.url_search(q)
if args['maps'] is not None:
logo.dorkify_logo()
q = str('maps' + args['maps'])
search_url.url_search(q)
if args['weather'] is not None:
logo.dorkify_logo()
q = str('weather' + args['weather'])
search_url.url_search(q)
if args['info'] is not None:
logo.dorkify_logo()
q = str('info' + args['info'])
search_url.url_search(q)
if args['define'] is not None:
logo.dorkify_logo()
q = str('define' + args['define'])
search_url.url_search(q)