Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
hhhrrrttt222111
GitHub Repository: hhhrrrttt222111/Dorkify
Path: blob/master/dorkify.py
810 views
1
#!/usr/bin/python
2
# -*- coding: utf-8 -*-
3
4
import sys
5
import argparse
6
7
import core.search_url as search_url
8
import core.logo as logo
9
import core.colors as colors
10
import core.mods as mods
11
import Modules.wordpress as wp
12
import Modules.information as info
13
import Modules.userpass as up
14
import Modules.cameras as cam
15
import Modules.ftp as ftp
16
17
18
parser = argparse.ArgumentParser()
19
ap = parser.add_mutually_exclusive_group()
20
ap.add_argument('--cli', help='Run the Command Line version of Dorkify', action='store_true')
21
ap.add_argument('--wp', help='WordPress sites vulnerabilities', action='store_true')
22
ap.add_argument('--up', help='Find vulnerable Usernames and Passwords', action='store_true')
23
ap.add_argument('--cam', help='Find vulnerable CCTV cameras', action='store_true')
24
ap.add_argument('--ftp', help='Find open FTP Servers', action='store_true')
25
ap.add_argument('-v', '--version', help='Version', action="version", version='2.01')
26
ap.add_argument('-s', '--search', type=str, help='Do a Google search')
27
ap.add_argument('-b', '--book', type=str, help='Search for a book or author')
28
ap.add_argument('-mu', '--music', type=str, help='Search for songs or artists')
29
ap.add_argument('-m', '--maps', type=str, help='Find maps of a city')
30
ap.add_argument('-w', '--weather', type=str, help='Check weather of a city')
31
ap.add_argument('-i', '--info', type=str, help='Get Information')
32
ap.add_argument('-d', '--define', type=str, help='Define a term')
33
ap.add_argument('-st', '--stocks', type=str, help='Search for Stock of a company with Ticker value')
34
ap.add_argument('--intitle', type=str, help='Search for a keywords in website title')
35
ap.add_argument('--inurl', type=str, help='Search for a keywords in website URL')
36
ap.add_argument('--site', type=str, help='Search for a Site')
37
args = vars(parser.parse_args())
38
39
40
41
notice = f'''
42
{colors.bcolors.OKBLUE}Please read the following information carefully before using this tool.
43
The content of the this repository is for educational purposes and uses only.
44
Do not use this tool excessively. Google Dorking might be legal but using the
45
functionality for cyber terrorism, cyber thefts and other malicious activities is illegal.
46
Using this tool is not anonymous and one needs to be aware that Google knows who you are
47
and from where and when you perform these searches.{colors.bcolors.ENDC}
48
49
50
{colors.bcolors.RED}DO YOU AGREE TO TO OUR TERMS AND CONDITIONS ?{colors.bcolors.ENDC} (Y / N) :
51
'''
52
53
54
55
def url_menu():
56
global ch2
57
mods.clear_screen()
58
logo.dorkify_logo()
59
print(f'''
60
CHOOSE OPTION :
61
62
{colors.bcolors.OKBLUE}[~]{colors.bcolors.ENDC} Find with specific terms in website titles [1]
63
{colors.bcolors.OKBLUE}[~]{colors.bcolors.ENDC} Find with specific terms in website URL's [2]
64
{colors.bcolors.OKBLUE}[~]{colors.bcolors.ENDC} Find Website [3]
65
66
''')
67
68
ch2 = int(input(" --> "))
69
print('\n\n')
70
71
72
def hacking_menu():
73
global ch6
74
mods.clear_screen()
75
logo.dorkify_logo()
76
print(f'''
77
CHOOSE OPTION :
78
79
{colors.bcolors.OKBLUE}[~]{colors.bcolors.ENDC} Wordpress Site Dorks [1]
80
{colors.bcolors.OKBLUE}[~]{colors.bcolors.ENDC} Find WordPress websites that are running the Wordfence WAF [2]
81
{colors.bcolors.OKBLUE}[~]{colors.bcolors.ENDC} Find vulnerable Usernames and Passwords [3]
82
{colors.bcolors.OKBLUE}[~]{colors.bcolors.ENDC} Find vulnerable CCTV cameras [4]
83
{colors.bcolors.OKBLUE}[~]{colors.bcolors.ENDC} Find vulnerable Web Servers [5]
84
{colors.bcolors.OKBLUE}[~]{colors.bcolors.ENDC} Search for Log files [6]
85
{colors.bcolors.OKBLUE}[~]{colors.bcolors.ENDC} Find open FTP Servers [7]
86
87
''')
88
89
ch6 = int(input(" --> "))
90
print('\n\n')
91
92
def dorkify_menu():
93
global ch
94
mods.clear_screen()
95
logo.dorkify_logo()
96
print(f'''
97
CHOOSE OPTION :
98
99
{colors.bcolors.OKBLUE}[~]{colors.bcolors.ENDC} Google Search [1]
100
{colors.bcolors.OKBLUE}[~]{colors.bcolors.ENDC} URL Search [2]
101
{colors.bcolors.OKBLUE}[~]{colors.bcolors.ENDC} Books [3]
102
{colors.bcolors.OKBLUE}[~]{colors.bcolors.ENDC} Music Downloads [4]
103
{colors.bcolors.OKBLUE}[~]{colors.bcolors.ENDC} Information [5]
104
{colors.bcolors.OKBLUE}[~]{colors.bcolors.ENDC} Dork Hacks! [6]
105
''')
106
107
ch = int(input(" --> "))
108
print('\n\n')
109
110
111
# WordPress
112
113
if args['wp']:
114
logo.dorkify_logo()
115
print(notice)
116
yn = input()
117
if yn == 'y' or yn =='Y':
118
wp.wordpress()
119
else :
120
print('YOU MUST AGREE TO THE TERMS')
121
sys.exit()
122
123
# Username & Passwords
124
125
if args['up']:
126
logo.dorkify_logo()
127
print(notice)
128
yn = input()
129
if yn == 'y' or yn =='Y':
130
up.userpass()
131
else :
132
print('YOU MUST AGREE TO THE TERMS')
133
sys.exit()
134
135
136
# Cameras
137
138
if args['cam']:
139
logo.dorkify_logo()
140
print(notice)
141
yn = input()
142
if yn == 'y' or yn =='Y':
143
cam.cameras()
144
else :
145
print('YOU MUST AGREE TO THE TERMS')
146
sys.exit()
147
148
# FTP Server
149
150
if args['ftp']:
151
logo.dorkify_logo()
152
print(notice)
153
yn = input()
154
if yn == 'y' or yn =='Y':
155
ftp.ftp()
156
else :
157
print('YOU MUST AGREE TO THE TERMS')
158
sys.exit()
159
160
161
# Main Program
162
163
if args['cli']:
164
logo.dorkify_logo()
165
print(notice)
166
yn = input()
167
if yn == 'y' or yn =='Y':
168
dorkify_menu()
169
else :
170
print('YOU MUST AGREE TO THE TERMS')
171
sys.exit()
172
173
if ch == 1:
174
q = input('SEARCH : ')
175
print('\n Performing Google Search\n')
176
search_url.url_search(q)
177
178
elif ch == 2:
179
url_menu()
180
if ch2 == 1:
181
s = input('SEARCH : ')
182
q = str('intitle:' + s)
183
print('\nSearching... \n')
184
search_url.url_search(q)
185
186
elif ch2 == 2:
187
s = input('SEARCH : ')
188
q = str('inurl:' + s)
189
print('\nSearching... \n')
190
search_url.url_search(q)
191
192
elif ch2 == 3:
193
s = input('SEARCH : ')
194
q = str('site:' + s)
195
print('\nSearching... \n')
196
search_url.url_search(q)
197
198
else:
199
print('INVALID OPTION \n TRY AGAIN')
200
sys.exit()
201
202
203
elif ch == 3:
204
s = input('SEARCH BOOKS/AUTHORS: ')
205
q = str('book:' + s)
206
print('\nSearching Books: \n')
207
search_url.url_search(q)
208
209
210
elif ch == 4:
211
s = input('SEARCH SONGS/ARTISTS: ')
212
q = str('?intitle:index.of?mp3 ' + s)
213
print('\nSearching Songs: \n')
214
search_url.url_search(q)
215
216
217
elif ch == 5:
218
info.information()
219
220
221
elif ch == 6:
222
hacking_menu()
223
if ch6 == 1:
224
wp.wordpress()
225
226
elif ch6 == 2:
227
q = str('filetype:ini “wordfence”')
228
print('\nSearching... \n')
229
search_url.url_search(q)
230
231
elif ch6 == 3:
232
up.userpass()
233
234
elif ch6 == 4:
235
cam.cameras()
236
237
elif ch6 == 5:
238
q = str('inurl:/proc/self/cwd')
239
print('\nSearching... \n')
240
search_url.url_search(q)
241
242
elif ch6 == 6:
243
q = str('allintext:username filetype:log')
244
print('\nSearching... \n')
245
search_url.url_search(q)
246
247
elif ch6 == 7:
248
ftp.ftp()
249
250
else:
251
print('INVALID OPTION : ')
252
sys.exit()
253
254
255
256
else:
257
print('INVALID OPTION! \n EXITING ')
258
sys.exit()
259
260
261
if args['search'] is not None:
262
logo.dorkify_logo()
263
search_url.url_search(args['search'])
264
265
if args['book'] is not None:
266
logo.dorkify_logo()
267
q = str('book:' + args['book'])
268
search_url.url_search(q)
269
270
if args['intitle'] is not None:
271
logo.dorkify_logo()
272
q = str('intitle:' + args['intitle'])
273
search_url.url_search(q)
274
275
if args['inurl'] is not None:
276
logo.dorkify_logo()
277
q = str('inurl:' + args['inurl'])
278
search_url.url_search(q)
279
280
if args['site'] is not None:
281
logo.dorkify_logo()
282
q = str('site:' + args['site'])
283
search_url.url_search(q)
284
285
if args['music'] is not None:
286
logo.dorkify_logo()
287
q = str('?intitle:index.of?mp3 ' + args['music'])
288
search_url.url_search(q)
289
290
if args['stocks'] is not None:
291
logo.dorkify_logo()
292
q = str('stocks' + args['stocks'])
293
search_url.url_search(q)
294
295
if args['maps'] is not None:
296
logo.dorkify_logo()
297
q = str('maps' + args['maps'])
298
search_url.url_search(q)
299
300
if args['weather'] is not None:
301
logo.dorkify_logo()
302
q = str('weather' + args['weather'])
303
search_url.url_search(q)
304
305
if args['info'] is not None:
306
logo.dorkify_logo()
307
q = str('info' + args['info'])
308
search_url.url_search(q)
309
310
if args['define'] is not None:
311
logo.dorkify_logo()
312
q = str('define' + args['define'])
313
search_url.url_search(q)
314