Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Lucksi
GitHub Repository: Lucksi/Mr.Holmes
Path: blob/master/Core/Searcher_website.py
1071 views
1
# ORIGINAL CREATOR: Luca Garofalo (Lucksi)
2
# AUTHOR: Luca Garofalo (Lucksi)
3
# Copyright (C) 2021-2024 Lucksi <[email protected]>
4
# License: GNU General Public License v3.0
5
6
import os
7
import urllib
8
import json
9
import requests
10
import shutil
11
from Core.Support import Font
12
from Core.Support import Creds
13
from Core.Support import FileTransfer
14
from Core.Support import Headers
15
from Core.Support.Phone import Numbers
16
from Core import E_Mail as Mail
17
from Core.Support import Proxies
18
from Core.Support import Requests_Search
19
from Core.Support import Clear
20
from Core.Support.Websites import Scanner
21
from Core.Support.Person import Scraper
22
from Core.Support import Dorks
23
from Core.Support import Logs
24
from Core.Support import Banner_Selector as banner
25
from Core.Support import Language
26
from Core.Support import DateFormat
27
from Core.Support import Map
28
from Core.Support import Notification
29
from Core.Support import Encoding
30
from Core.Support import ApiCheck as Api
31
from time import sleep
32
from datetime import datetime
33
34
filename = Language.Translation.Get_Language()
35
filename
36
37
Type = "Web"
38
39
40
class Web:
41
42
@staticmethod
43
def Profiles(username,report):
44
choice = int(input(
45
Font.Color.BLUE + "\n[+]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Default", "choice", "None") + Font.Color.GREEN + "[#MR.HOLMES#]" + Font.Color.WHITE + "-->"))
46
if choice == 1:
47
http_proxy = Proxies.proxy.final_proxis
48
http_proxy2 = Proxies.proxy.choice3
49
source = "http://ip-api.com/json/" + http_proxy2
50
access = urllib.request.urlopen(source)
51
try:
52
content = access.read()
53
final = json.loads(content)
54
identity = Language.Translation.Translate_Language(
55
filename, "Default", "ProxyLoc", "None").format(final["regionName"], final["country"])
56
except Exception as e:
57
print("SOMETHING WENT WRONG SORRY")
58
http_proxy = None
59
http_proxy2 = str(http_proxy)
60
identity = "None"
61
62
else:
63
http_proxy = None
64
http_proxy2 = str(http_proxy)
65
identity = "None"
66
print(Font.Color.GREEN + "\n[+]" + Font.Color.WHITE +
67
Language.Translation.Translate_Language(filename, "Default", "Proxy", "None").format(http_proxy2))
68
if identity != "None":
69
print(Font.Color.GREEN + "[+]" + Font.Color.WHITE + identity)
70
else:
71
pass
72
print(Font.Color.WHITE + "----------------------------------------------------------INSTAGRAM------------------------------------------------------------------\n" + Font.Color.BLUE + "\n[I]" + Font.Color.WHITE + "CHECKING FIRST 20 INSTAGRAM PROFILES THAT CONTAINS: {}".format(username))
73
username_2 = username.split(".", 1)[0]
74
try:
75
Scraper.Search.Instagram(report, username, http_proxy, "None", "None", "None", "None", "None","Websites")
76
except Exception as e:
77
print(Font.Color.RED + "[!]" + Font.Color.WHITE + "SOMETHING WENT WRONG" + str(e))
78
print(Font.Color.BLUE + "\n[I]" + Font.Color.WHITE + "CHECKING FIRST 20 INSTAGRAM PROFILE FOR: {}".format(username_2))
79
sleep(5)
80
try:
81
Scraper.Search.Instagram(report, username_2, http_proxy, "None", "None", "None", "None", username,"Websites")
82
except Exception as e:
83
print(Font.Color.RED + "[!]" + Font.Color.WHITE + "SOMETHING WENT WRONG" + str(e))
84
print(Font.Color.WHITE + "---------------------------------------------------------TWITTER---------------------------------------------------------------------\n" + Font.Color.BLUE + "\n[I]" + Font.Color.WHITE + "CHECKING FIRST 20 TWITTER PROFILES THAT CONTAINS: {}".format(username))
85
try:
86
Scraper.Search.Twitter(report, username, http_proxy, "None", "None","None","Websites")
87
except Exception as e:
88
print(Font.Color.RED + "[!]" + Font.Color.WHITE + "SOMETHING WENT WRONG" + str(e))
89
print(Font.Color.BLUE + "\n[I]" + Font.Color.WHITE + "CHECKING FIRST 20 TWITTER PROFILES FOR: {}".format(username_2))
90
sleep(5)
91
try:
92
Scraper.Search.Twitter(report, username_2, http_proxy, "None", "None",username,"Websites")
93
except Exception as e:
94
print(Font.Color.RED + "[!]" + Font.Color.WHITE + "SOMETHING WENT WRONG" + str(e))
95
print(Font.Color.WHITE + "---------------------------------------------------------TIKTOK---------------------------------------------------------------------\n" + Font.Color.BLUE + "\n[I]" + Font.Color.WHITE + "CHECKING FIRST 20 TIKTOK PROFILES THAT CONTAINS: {}".format(username))
96
try:
97
Scraper.Search.TikTok(report, username, http_proxy, "None", "None","Websites")
98
except Exception as e:
99
print(Font.Color.RED + "[!]" + Font.Color.WHITE + "SOMETHING WENT WRONG" + str(e))
100
print(Font.Color.BLUE + "\n[I]" + Font.Color.WHITE + "CHECKING FIRST 20 TIKTOK PROFILES FOR: {}".format(username_2))
101
sleep(5)
102
try:
103
Scraper.Search.TikTok(report, username_2, http_proxy, "None",username,"Websites")
104
except Exception as e:
105
print(Font.Color.RED + "[!]" + Font.Color.WHITE + "SOMETHING WENT WRONG" + str(e))
106
print(Font.Color.WHITE + "---------------------------------------------------------GIT-HUB---------------------------------------------------------------------\n" + Font.Color.BLUE + "\n[I]" + Font.Color.WHITE + "CHECKING FIRST 20 TWITTER PROFILES THAT CONTAINS: {}".format(username))
107
try:
108
Scraper.Search.Github(report, username, http_proxy, "None","None","Websites")
109
except Exception as e:
110
print(Font.Color.RED + "[!]" + Font.Color.WHITE + "SOMETHING WENT WRONG" + str(e))
111
print(Font.Color.BLUE + "\n[I]" + Font.Color.WHITE + "CHECKING FIRST 20 GIT-HUB PROFILES FOR: {}".format(username_2))
112
sleep(5)
113
try:
114
Scraper.Search.Github(report, username_2, http_proxy, "None",username,"Websites")
115
except Exception as e:
116
print(Font.Color.RED + "[!]" + Font.Color.WHITE + "SOMETHING WENT WRONG" + str(e))
117
print("-------------------------------------------------------------------------------------------------------------------------------------")
118
choice = int(input(
119
Font.Color.BLUE + "\n[?]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Website", "Questions", "Robots") + Font.Color.GREEN + "[#MR.HOLMES#]" + Font.Color.WHITE + "-->"))
120
if choice == 1:
121
Web.Robots(username, report)
122
else:
123
choice = int(input(
124
Font.Color.BLUE + "\n[?]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Website", "Questions", "Ports") + Font.Color.GREEN + "[#MR.HOLMES#]" + Font.Color.WHITE + "-->"))
125
if choice == 1:
126
Web.Ports(username, report)
127
else:
128
choice = int(input(
129
Font.Color.BLUE + "\n[?]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Website", "Questions", "Traceroute") + Font.Color.GREEN + "[#MR.HOLMES#]" + Font.Color.WHITE + "-->"))
130
if choice == 1:
131
Web.trace(username, report)
132
133
@staticmethod
134
def Ports(username, report):
135
f = open(report, "a")
136
f.write(Language.Translation.Translate_Language(
137
filename, "Report", "Website", "Ports"))
138
f.close()
139
Scanner.Port.Scan(username, report)
140
choice = int(input(
141
Font.Color.BLUE + "\n[?]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Website", "Questions", "Traceroute") + Font.Color.GREEN + "[#MR.HOLMES#]" + Font.Color.WHITE + "-->"))
142
if choice == 1:
143
Web.trace(username, report)
144
145
@staticmethod
146
def Banner(Mode):
147
Clear.Screen.Clear()
148
Folder = "Banners/Websites"
149
banner.Random.Get_Banner(Folder, Mode)
150
151
@staticmethod
152
def Reputation(username, report):
153
subject = "DOMAIN/WEBSITE/IP"
154
data = "Site_lists/Websites/Lookup.json"
155
f = open(report, "a")
156
f.write(Language.Translation.Translate_Language(
157
filename, "Report", "Website", "Malicious"))
158
print(Font.Color.GREEN + "\n[+]" + Font.Color.WHITE +
159
Language.Translation.Translate_Language(filename, "Website", "Default", "Research").format(username))
160
sc = int(input(
161
Font.Color.BLUE + "\n[?]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Default", "choice", "None") + Font.Color.GREEN + "[#MR.HOLMES#]" + Font.Color.WHITE + "-->"))
162
if sc == 1:
163
http_proxy = Proxies.proxy.final_proxis
164
http_proxy2 = Proxies.proxy.choice3
165
source = "http://ip-api.com/json/" + http_proxy2
166
access = urllib.request.urlopen(source)
167
content = access.read()
168
final = json.loads(content)
169
identity = Language.Translation.Translate_Language(filename, "Default", "ProxyLoc", "None").format(
170
final["regionName"], final["country"])
171
else:
172
http_proxy = None
173
http_proxy2 = str(http_proxy)
174
identity = "None"
175
print(Font.Color.GREEN + "\n[+]" + Font.Color.WHITE +
176
Language.Translation.Translate_Language(filename, "Default", "Proxy", "None") .format(http_proxy2))
177
if identity != "None":
178
print(Font.Color.GREEN + "[+]" + Font.Color.WHITE + identity)
179
else:
180
pass
181
folder = "Websites"
182
Logs.Log.Checker(username, folder)
183
successfull = []
184
successfullName = []
185
ScraperSites = []
186
Writable = False
187
json_file = "GUI/Reports/Websites/{}/{}.json".format(
188
username, username)
189
json_file2 = "GUI/Reports/Websites/{}/{}.json".format(
190
username, "Name")
191
f = open(data,)
192
data = json.loads(f.read())
193
for sites in data:
194
for data1 in sites:
195
name = sites[data1]["name"]
196
site1 = sites[data1]["url"].replace("{}", username)
197
site2 = sites[data1]["url2"].replace("{}", username)
198
error = sites[data1]["Error"]
199
main = sites[data1]["main"]
200
is_scrapable = sites[data1]["Scrapable"]
201
print(Font.Color.GREEN +
202
"\n[+]" + Font.Color.WHITE + "TRYING ON: {} ".format(name))
203
try:
204
Requests_Search.Search.search(error, report, site1, site2, http_proxy, sites, data1, username,
205
subject, successfull, name, successfullName, is_scrapable, ScraperSites, Writable, main, json_file, json_file2)
206
except Exception as e:
207
print(Font.Color.BLUE + "\n[N]" + Font.Color.WHITE +
208
Language.Translation.Translate_Language(filename, "Default", "Connection_Error1", "None"))
209
http_proxy = None
210
try:
211
Requests_Search.Search.search(error, report, site1, site2, http_proxy, sites, data1, username,
212
subject, successfull, name, successfullName, is_scrapable, ScraperSites, Writable, main, json_file, json_file2)
213
except Exception as e:
214
print(
215
Font.Color.BLUE + "\n[N]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Default", "Site_Error", "None"))
216
217
print(Font.Color.GREEN + "\n[+]" + Font.Color.WHITE +
218
Language.Translation.Translate_Language(filename, "Default", "TotFound", "None").format(subject, username))
219
220
if len(successfull):
221
for names in successfull:
222
print(Font.Color.YELLOW + "[v]" + Font.Color.WHITE + names)
223
print(Font.Color.RED + "\n[!]" + Font.Color.WHITE +
224
Language.Translation.Translate_Language(filename, "Website", "Default", "Unsecure").format(username))
225
else:
226
print(Font.Color.YELLOW + "\n[v]" + Font.Color.WHITE +
227
Language.Translation.Translate_Language(filename, "Website", "Default", "Secure").format(username))
228
f = open(report, "a")
229
f.write(Language.Translation.Translate_Language(
230
filename, "Report", "Website", "Safe"))
231
f.close()
232
consultFile = "Site_lists/Websites/Consult.json"
233
print(Font.Color.BLUE + "\n[I]" + Font.Color.WHITE +
234
Language.Translation.Translate_Language(filename, "Website", "Default", "Info"))
235
f = open(consultFile,)
236
data = json.loads(f.read())
237
for sites in data:
238
for data1 in sites:
239
site1 = sites[data1]["url"].replace("{}", username)
240
print(Font.Color.YELLOW + "[v]" + Font.Color.WHITE + site1)
241
f = open(report, "a")
242
f.write(Language.Translation.Translate_Language(
243
filename, "Report", "Website", "Info"))
244
for sites in data:
245
for data1 in sites:
246
site1 = sites[data1]["url"].replace("{}", username)
247
f.write(site1+"\n")
248
f.close()
249
choice = int(input(
250
Font.Color.BLUE + "\n[?]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Website", "Questions", "Soc") + Font.Color.GREEN + "[#MR.HOLMES#]" + Font.Color.WHITE + "-->"))
251
if choice == 1:
252
Web.Profiles(username, report)
253
else:
254
choice = int(input(
255
Font.Color.BLUE + "\n[?]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Website", "Questions", "Robots") + Font.Color.GREEN + "[#MR.HOLMES#]" + Font.Color.WHITE + "-->"))
256
if choice == 1:
257
Web.Robots(username, report)
258
else:
259
choice = int(input(
260
Font.Color.BLUE + "\n[?]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Website", "Questions", "Ports") + Font.Color.GREEN + "[#MR.HOLMES#]" + Font.Color.WHITE + "-->"))
261
if choice == 1:
262
Web.Ports(username, report)
263
else:
264
choice = int(input(
265
Font.Color.BLUE + "\n[?]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Website", "Questions", "Traceroute") + Font.Color.GREEN + "[#MR.HOLMES#]" + Font.Color.WHITE + "-->"))
266
if choice == 1:
267
Web.trace(username, report)
268
269
@staticmethod
270
def Robots(username, report):
271
headers = Headers.Get.classic()
272
name = "Site_lists/Websites/Robots.json"
273
f = open(name,)
274
print(Font.Color.GREEN + "\n[+]" + Font.Color.WHITE +
275
"DOWNLOADING {} Robots.txt".format(username))
276
choice = int(input(
277
Font.Color.BLUE + "\n[?]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Default", "choice", "None") + Font.Color.GREEN + "[#MR.HOLMES#]" + Font.Color.WHITE + "-->"))
278
if choice == 1:
279
http_proxy = Proxies.proxy.final_proxis
280
http_proxy2 = Proxies.proxy.choice3
281
source = "http://ip-api.com/json/" + http_proxy2
282
access = urllib.request.urlopen(source)
283
content = access.read()
284
final = json.loads(content)
285
identity = Language.Translation.Translate_Language(
286
filename, "Default", "ProxyLoc", "None").format(final["regionName"], final["country"])
287
else:
288
http_proxy = None
289
http_proxy2 = str(http_proxy)
290
identity = "None"
291
print(Font.Color.GREEN + "\n[+]" + Font.Color.WHITE +
292
Language.Translation.Translate_Language(filename, "Default", "Proxy", "None").format(http_proxy2))
293
if identity != "None":
294
print(Font.Color.GREEN + "[+]" + Font.Color.WHITE + identity)
295
else:
296
pass
297
robot = "GUI/Reports/Websites/Robots/" + username + "_robots.txt"
298
final = json.loads(f.read())
299
for sites in final:
300
try:
301
url = sites["Robots"]["url"].replace("{}", username)
302
dork = requests.get(
303
url, headers=headers, proxies=http_proxy, timeout=None, allow_redirects=True)
304
if dork.status_code == 200:
305
open(robot, 'wb').write(dork.content)
306
print(Font.Color.YELLOW +
307
"[+]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Website", "Default", "Robots").format(robot))
308
print(dork.text)
309
else:
310
print(Font.Color.RED + "[!]" + Font.Color.WHITE +
311
Language.Translation.Translate_Language(filename, "Website", "Default", "NoRobots").format(username))
312
except Exception as e:
313
try:
314
print(Font.Color.BLUE + "\n[N]" + Font.Color.WHITE +
315
Language.Translation.Translate_Language(filename, "Default", "Connection_Error1", "None"))
316
url = sites["Robots"]["url"].replace("{}", username)
317
dork = requests.get(
318
url, headers=headers, proxies=None, timeout=None, allow_redirects=True)
319
if dork.status_code == 200:
320
open(robot, 'wb').write(dork.content)
321
print(Font.Color.YELLOW +
322
"[v]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Website", "Default", "Robots").format(robot))
323
print(dork.text)
324
else:
325
print(Font.Color.RED + "[!]" + Font.Color.WHITE +
326
Language.Translation.Translate_Language(filename, "Website", "Default", "NoRobots").format(username))
327
except Exception as e:
328
print(Font.Color.RED + "[!]" + Font.Color.WHITE +
329
Language.Translation.Translate_Language(filename, "Website", "Default", "NoRobots").format(username))
330
331
choice = int(input(
332
Font.Color.BLUE + "\n[?]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Website", "Questions", "Ports") + Font.Color.GREEN + "[#MR.HOLMES#]" + Font.Color.WHITE + "-->"))
333
if choice == 1:
334
Web.Ports(username, report)
335
else:
336
choice = int(input(
337
Font.Color.BLUE + "\n[?]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Website", "Questions", "Traceroute") + Font.Color.GREEN + "[#MR.HOLMES#]" + Font.Color.WHITE + "-->"))
338
if choice == 1:
339
Web.trace(username, report)
340
else:
341
pass
342
343
@staticmethod
344
def trace(username, report):
345
print(Font.Color.GREEN + "\n[+]" + Font.Color.WHITE +
346
Language.Translation.Translate_Language(filename, "Website", "Default", "Traceroute").format(username))
347
if os.name == "nt":
348
command = ("tracert " + username)
349
else:
350
command = ("traceroute " + username)
351
proces = os.popen(command)
352
results = str(proces.read())
353
print(results)
354
f = open(report, "a")
355
f.write("\n\nTRACEROUTE SEQUENCE:" + "\r\n")
356
f.write(results)
357
f.close()
358
359
@staticmethod
360
def google_dork(username, number, num, email, email2):
361
report = "GUI/Reports/Websites/Dorks/{}_dorks.txt".format(username)
362
if os.path.isfile(report):
363
os.remove(report)
364
print(Font.Color.BLUE + "\n[I]" + Font.Color.WHITE +
365
Language.Translation.Translate_Language(filename, "Dorks", "Remove", "None").format(username))
366
else:
367
pass
368
nomefile = "Site_lists/Websites/Google_dorks.txt"
369
Type = "GOOGLE"
370
Dorks.Search.dork(username, report, nomefile, Type)
371
Web.yandex_dork(username, report)
372
if number == True:
373
f = open(report, "a")
374
f.write("\nGENERATING LINK FOR {} PHONE NUMBER {}...\n".format(
375
username, num))
376
f.close()
377
print(Font.Color.GREEN + "\n[+]" + Font.Color.WHITE +
378
Language.Translation.Translate_Language(filename, "Website", "Default", "Phone").format(username, num))
379
phonen = "Site_lists/Websites/ExtraDorks.txt"
380
f = open(phonen, "r")
381
for sites in f:
382
site = sites.rstrip("\n")
383
site = site.replace("{}", num)
384
print(Font.Color.YELLOW + "[v]" + Font.Color.WHITE + site)
385
f = open(report, "a")
386
f.write(site + "\n")
387
f.close()
388
sleep(2)
389
f.close()
390
if email == True:
391
f = open(report, "a")
392
f.write("\nGENERATING LINK FOR {} EMAIL {}...\n".format(
393
username, email2))
394
f.close()
395
print(Font.Color.GREEN + "\n[+]" + Font.Color.WHITE +
396
Language.Translation.Translate_Language(filename, "Website", "Default", "Email").format(username, email2))
397
f = open(phonen, "r")
398
for sites in f:
399
site = sites.rstrip("\n")
400
site = site.replace("{}", email2)
401
print(Font.Color.YELLOW + "[v]" + Font.Color.WHITE + site)
402
f = open(report, "a")
403
f.write(site + "\n")
404
f.close()
405
sleep(2)
406
f.close()
407
else:
408
pass
409
report = "GUI/Reports/Websites/{}/{}.txt".format(username, username)
410
choice = int(input(
411
Font.Color.BLUE + "\n[+]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Website", "Questions", "Repu") + Font.Color.GREEN + "[#MR.HOLMES#]" + Font.Color.WHITE + "-->"))
412
if choice == 1:
413
Web.Reputation(username, report)
414
else:
415
choice = int(input(
416
Font.Color.BLUE + "\n[?]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Website", "Questions", "Soc") + Font.Color.GREEN + "[#MR.HOLMES#]" + Font.Color.WHITE + "-->"))
417
if choice == 1:
418
Web.Profiles(username, report)
419
else:
420
choice = int(input(
421
Font.Color.BLUE + "\n[?]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Website", "Questions", "Robots") + Font.Color.GREEN + "[#MR.HOLMES#]" + Font.Color.WHITE + "-->"))
422
if choice == 1:
423
Web.Robots(username, report)
424
else:
425
choice = int(input(
426
Font.Color.BLUE + "\n[?]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Website", "Questions", "Ports") + Font.Color.GREEN + "[#MR.HOLMES#]" + Font.Color.WHITE + "-->"))
427
if choice == 1:
428
Web.Ports(username, report)
429
else:
430
choice = int(input(
431
Font.Color.BLUE + "\n[?]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Website", "Questions", "Traceroute") + Font.Color.GREEN + "[#MR.HOLMES#]" + Font.Color.WHITE + "-->"))
432
if choice == 1:
433
Web.trace(username, report)
434
435
@staticmethod
436
def yandex_dork(username, report):
437
nomefile = "Site_lists/Websites/Yandex_dorks.txt"
438
Type = "YANDEX"
439
Dorks.Search.dork(username, report, nomefile, Type)
440
441
@staticmethod
442
def whois_lookup(username, report, Mode):
443
print(Font.Color.GREEN + "\n[+]" + Font.Color.WHITE +
444
Language.Translation.Translate_Language(filename, "Website", "Default", "Whois").format(username))
445
sleep(2)
446
Key = Api.Check.WhoIs()
447
Key
448
if Key == "None":
449
if (os.name != "nt"):
450
print(Font.Color.RED + "\n[!]" + Font.Color.WHITE +
451
Language.Translation.Translate_Language(filename, "Website", "Parameters", "KeyNoFound"))
452
command = ("whois " + username)
453
proces = os.popen(command)
454
results = str(proces.read())
455
final = results + command
456
print(Font.Color.WHITE + results)
457
f = open(report, "a")
458
f.write("\nWEBSITE DATA:" + "\r\n")
459
f.write(results)
460
f.close()
461
num = None
462
number = False
463
em = None
464
email2 = None
465
email = False
466
else:
467
print(Font.Color.RED + "\n[!]" + Font.Color.WHITE +
468
Language.Translation.Translate_Language(filename, "Website", "Default", "NoWhois"))
469
num = None
470
number = False
471
email = None
472
email2 = None
473
else:
474
try:
475
print(Font.Color.GREEN + "[+]" +
476
Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Website", "Parameters", "KeyFound"))
477
Key2 = str(Key)
478
source = "https://www.whoisxmlapi.com/whoisserver/WhoisService?apiKey={}&domainName={}&outputFormat=JSON".format(
479
Key2, username)
480
access = urllib.request.urlopen(source)
481
reader = access.read()
482
final = json.loads(reader)
483
created = "CREATION-DATE: " + \
484
final["WhoisRecord"]["createdDate"]
485
modified = "UPDATE-DATE: " + \
486
final["WhoisRecord"]["updatedDate"]
487
expired = "EXPIRED-DATE: " + \
488
final["WhoisRecord"]["expiresDate"]
489
domain = "DOMAIN: " + \
490
final["WhoisRecord"]["registrant"]["name"]
491
organization = "ORGANIZATION: " + \
492
final["WhoisRecord"]["registrant"]["organization"]
493
nation = "NATION: " + \
494
final["WhoisRecord"]["registrant"]["country"]
495
nationCode = "NATION-CODE: " + \
496
final["WhoisRecord"]["registrant"]["countryCode"]
497
if "state" in final["WhoisRecord"]["registrant"]:
498
state = "STATE: " + final["WhoisRecord"]["registrant"]["state"]
499
else:
500
state = "STATE: NONE"
501
if "city" in final["WhoisRecord"]["registrant"]:
502
city = "CITY: " + final["WhoisRecord"]["registrant"]["city"]
503
city2 = str(final["WhoisRecord"]["registrant"]["city"])
504
else:
505
city = "CITY: NONE"
506
if "street1" in final["WhoisRecord"]["registrant"]:
507
street = "STREET: " + \
508
final["WhoisRecord"]["registrant"]["street1"].replace("\n"," ")
509
if ".com" in street:
510
street2 = str(final["WhoisRecord"]["registrant"]["street1"].replace("\n"," ").split(".com",1)[1])
511
else:
512
street2 = str(final["WhoisRecord"]["registrant"]["street1"].replace("\n"," "))
513
else:
514
street = "STREET: NONE"
515
if "email" in final["WhoisRecord"]["registrant"]:
516
email = "EMAIL: " + final["WhoisRecord"]["registrant"]["email"]
517
email2 = final["WhoisRecord"]["registrant"]["email"]
518
else:
519
email = "EMAIL: NONE"
520
email2 = ""
521
if "telephone" in final["WhoisRecord"]["registrant"]:
522
telephone = "TELEPHONE: " + \
523
final["WhoisRecord"]["registrant"]["telephone"]
524
telephone2 = final["WhoisRecord"]["registrant"]["telephone"]
525
else:
526
telephone = "TELEPHONE: NONE"
527
telephone2 = ""
528
if "street1" in final["WhoisRecord"]["registrant"] and "city" in final["WhoisRecord"]["registrant"]:
529
link = "https://www.google.com/maps/place/{} {}".format(
530
street2, city2)
531
else:
532
link = "None"
533
sleep(2)
534
print(Font.Color.YELLOW + "\n[v]" + Font.Color.WHITE + created)
535
print(Font.Color.YELLOW + "[v]" + Font.Color.WHITE + modified)
536
print(Font.Color.YELLOW + "[v]" + Font.Color.WHITE + expired)
537
print(Font.Color.YELLOW + "[v]" + Font.Color.WHITE + domain)
538
print(Font.Color.YELLOW + "[v]" +
539
Font.Color.WHITE + organization)
540
print(Font.Color.YELLOW + "[v]" + Font.Color.WHITE + nation)
541
print(Font.Color.YELLOW + "[v]" +
542
Font.Color.WHITE + nationCode)
543
print(Font.Color.YELLOW + "[v]" + Font.Color.WHITE + state)
544
print(Font.Color.YELLOW + "[v]" + Font.Color.WHITE + city)
545
print(Font.Color.YELLOW + "[v]" + Font.Color.WHITE + street)
546
print(Font.Color.YELLOW + "[v]" + Font.Color.WHITE + email)
547
print(Font.Color.YELLOW + "[v]" + Font.Color.WHITE + telephone)
548
print(Font.Color.GREEN +
549
"\n[+]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Website", "Default", "Maps"))
550
print(Font.Color.YELLOW + "[v]" + Font.Color.WHITE + link)
551
f = open(report, "a")
552
f.write("\nWEBSITE DATA:" + "\r\n")
553
f.write(created + "\r\n")
554
f.write(modified + "\r\n")
555
f.write(expired + "\r\n")
556
f.write(domain + "\r\n")
557
f.write(organization + "\r\n")
558
f.write(nation + "\r\n")
559
f.write(nationCode + "\r\n")
560
f.write(state + "\r\n")
561
f.write(city + "\r\n")
562
f.write(street + "\r\n")
563
f.write(email + "\r\n")
564
f.write(telephone + "\r\n")
565
f.close()
566
try:
567
link_json = "https://nominatim.openstreetmap.org/search?q={}+{}&format=json".format(
568
street2, city2).replace(" ", "%20")
569
get_Coords = urllib.request.urlopen(link_json)
570
Reader = get_Coords.read()
571
parser = json.loads(Reader)
572
for value in parser:
573
Lat = value["lat"]
574
Lon = value["lon"]
575
report_Coordinates = "GUI/Reports/Websites/Coordinates/Street_Geolocation/" + \
576
username + ".json"
577
data = {
578
"Geolocation": {
579
"Latitude": Lat,
580
"Longitude": Lon
581
}
582
}
583
print(
584
Font.Color.GREEN + "\n[+]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Website", "Default", "Geo"))
585
sleep(2)
586
print(Font.Color.YELLOW + "[v]" + Font.Color.WHITE +
587
"LATITUDE:" + Font.Color.GREEN + " {}".format(Lat))
588
sleep(2)
589
print(Font.Color.YELLOW + "[v]" + Font.Color.WHITE +
590
"LONGITUDE:" + Font.Color.GREEN + " {}".format(Lon))
591
with open(report_Coordinates, "w", encoding="utf-8") as output:
592
json.dump(data, output, ensure_ascii=False, indent=4)
593
Map.Creation.mapWeb(report_Coordinates, Lat, Lon, username)
594
except Exception as e:
595
f = str(e)
596
print(Font.Color.RED + "\n[!]" + Font.Color.WHITE +
597
Language.Translation.Translate_Language(filename, "Website", "Default", "NoGeo") + f)
598
num = telephone2
599
if num != "":
600
number = True
601
sc = int(input(Font.Color.BLUE + "\n[?]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Website", "Parameters", "PhoneFound").format(
602
num) + Font.Color.GREEN + "\n\n[#MR.HOLMES#]" + Font.Color.WHITE + "-->"))
603
if sc == 1:
604
folder = "GUI/Reports/Websites/{}/{}".format(
605
username, num)
606
if os.path.exists(folder):
607
shutil.rmtree(folder)
608
os.mkdir(folder)
609
report2 = folder + "/{}.txt".format(num)
610
f = open(report2, "w")
611
f.write("\nPHONE NUMBER DATA:\n")
612
f.close()
613
code = 0
614
try:
615
Numbers.Phony.Number(
616
num, report2, code, Mode, Type, username)
617
except Exception as e:
618
print("SOMETHING WENT WRONG")
619
else:
620
pass
621
else:
622
print(Font.Color.RED +
623
"[!]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Website", "Parameters", "PhoneNotFound"))
624
number = False
625
if email2 != "":
626
email = True
627
sc = int(input(Font.Color.BLUE + "\n[?]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Website", "Parameters", "EmailFound").format(
628
email2) + Font.Color.GREEN + "\n\n[#MR.HOLMES#]" + Font.Color.WHITE + "-->"))
629
if sc == 1:
630
folder = folder = "GUI/Reports/Websites/{}/{}".format(
631
username, email2)
632
os.mkdir(folder)
633
report2 = folder + "/{}.txt".format(email2)
634
try:
635
Mail.Mail_search.Lookup(email2,report2)
636
except Exception as e:
637
print("SOMETHING WENT WRONG")
638
else:
639
pass
640
else:
641
print(Font.Color.RED +
642
"[!]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Website", "Parameters", "EmailNotFound"))
643
email = False
644
except Exception as e:
645
print(str(e))
646
num = None
647
number = False
648
email = False
649
email2 = None
650
print(Font.Color.RED + "[!]" + Font.Color.WHITE +
651
Language.Translation.Translate_Language(filename, "Website", "Parameters", "Error"))
652
command = ("whois " + username)
653
proces = os.popen(command)
654
results = str(proces.read())
655
final = results + command
656
print(Font.Color.WHITE + results)
657
f = open(report, "a")
658
f.write("\nWEBSITE DATA:" + "\r\n")
659
f.write(results)
660
f.close()
661
print(Font.Color.GREEN +
662
"\n[+]" + Font.Color.WHITE + "GETTING REPUTATION RATING...")
663
try:
664
source = "https://domain-reputation.whoisxmlapi.com/api/v2?apiKey={}&domainName={}".format(
665
Key2, username)
666
access = urllib.request.urlopen(source)
667
reader = access.read()
668
final = json.loads(reader)
669
repu = final["reputationScore"]
670
tests = final["testResults"]
671
print(Font.Color.YELLOW +
672
"[v]" + Font.Color.WHITE + "REPUTATION RATING: {}".format(repu))
673
f = open(report, "a")
674
f.write("\n\nREPUTATION RATING: {}\r\n".format(repu))
675
for test1 in tests:
676
print(Font.Color.GREEN +
677
"\n[+]" + Font.Color.WHITE + "TEST-NAME: {}".format(test1["test"]))
678
print(Font.Color.YELLOW +
679
"[v]" + Font.Color.WHITE + "TEST-CODE: {}".format(test1["testCode"]))
680
print(Font.Color.GREEN +
681
"[+]" + Font.Color.WHITE + "WARNING LISTS FOR TEST: {}".format(test1["test"]))
682
f.write("TEST-NAME: {}".format(test1["test"]) + "\r\n")
683
f.write("TEST-CODE: {}".format(test1["testCode"]) + "\r\n")
684
f.write("TEST-NAME: {}".format(test1["test"]) + "\r\n")
685
f.write("WARNING LISTS FOR TEST: {}".format(
686
test1["test"]) + "\r\n")
687
for warning1 in test1["warnings"]:
688
print(Font.Color.YELLOW +
689
"[v]" + Font.Color.WHITE + "DESCRIPTION: {}".format(warning1["warningDescription"]))
690
print(Font.Color.YELLOW +
691
"[v]" + Font.Color.WHITE + "CODE: {}".format(warning1["warningCode"]))
692
f.write("DESCRIPTION: {}".format(
693
warning1["warningDescription"]) + "\r\n")
694
f.write("CODE: {}".format(
695
warning1["warningCode"]) + "\r\n")
696
f.close()
697
except Exception as e:
698
pass
699
choice = int(input(
700
Font.Color.BLUE + "\n[?]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Default", "Dorks", "None") + Font.Color.GREEN + "[#MR.HOLMES#]" + Font.Color.WHITE + "-->"))
701
if choice == 1:
702
Web.google_dork(username, number, num,email,email2)
703
else:
704
choice = int(input(
705
Font.Color.BLUE + "\n[?]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Website", "Questions", "Repu") + Font.Color.GREEN + "[#MR.HOLMES#]" + Font.Color.WHITE + "-->"))
706
if choice == 1:
707
Web.Reputation(username, report)
708
else:
709
choice = int(input(
710
Font.Color.BLUE + "\n[?]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Website", "Questions", "Soc") + Font.Color.GREEN + "[#MR.HOLMES#]" + Font.Color.WHITE + "-->"))
711
if choice == 1:
712
Web.Profiles(username, report)
713
else:
714
choice = int(input(
715
Font.Color.BLUE + "\n[?]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Website", "Questions", "Robots") + Font.Color.GREEN + "[#MR.HOLMES#]" + Font.Color.WHITE + "-->"))
716
if choice == 1:
717
Web.Robots(username, report)
718
else:
719
choice = int(input(
720
Font.Color.BLUE + "\n[?]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Website", "Questions", "Ports") + Font.Color.GREEN + "[#MR.HOLMES#]" + Font.Color.WHITE + "-->"))
721
if choice == 1:
722
Web.Ports(username, report)
723
else:
724
choice = int(input(
725
Font.Color.BLUE + "\n[?]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Website", "Questions", "Traceroute") + Font.Color.GREEN + "[#MR.HOLMES#]" + Font.Color.WHITE + "-->"))
726
if choice == 1:
727
Web.trace(username, report)
728
729
@staticmethod
730
def search(username, Mode):
731
os.system("cls" if os.name == "nt" else "clear")
732
Web.Banner(Mode)
733
print(Font.Color.BLUE + "\n[I]" + Font.Color.WHITE + "INFO:" + "[{}]".format(Font.Color.GREEN + Language.Translation.Translate_Language(filename,"Website","Default","Explanation") + Font.Color.WHITE) )
734
folder = "GUI/Reports/Websites/" + username + "/"
735
if os.path.isdir(folder):
736
shutil.rmtree(folder)
737
print(Font.Color.BLUE + "\n[I]" + Font.Color.WHITE +
738
Language.Translation.Translate_Language(filename, "Default", "Delete", "None").format(username))
739
os.mkdir(folder)
740
report = "GUI/Reports/Websites/{}/{}.txt".format(username, username)
741
report_Ip = "GUI/Reports/Websites/Coordinates/Ip_Geolocation/" + username + ".json"
742
now = datetime.now()
743
dataformat = DateFormat.Get.Format()
744
dt_string = now.strftime(dataformat)
745
Date = "Date: " + str(dt_string)
746
print(Font.Color.GREEN + "\n[+]" + Font.Color.WHITE +
747
Language.Translation.Translate_Language(filename, "Website", "Default", "Search").format(username))
748
sleep(3)
749
source = "http://ip-api.com/json/" + username
750
access = urllib.request.urlopen(source)
751
content = access.read()
752
final = json.loads(content)
753
status = final["status"]
754
if status != "fail":
755
ip = "IP: " + final["query"]
756
country = "NATION: " + final["country"]
757
country_code = "NATION-CODE: " + final["countryCode"]
758
region = "REGION-CODE: " + final["region"]
759
regionName = "REGION-NAME: " + final["regionName"]
760
city = "CITY: " + final["city"]
761
timezone = "TIMEZONE: " + final["timezone"]
762
isp = "ISP: " + final["isp"]
763
org = "ORG: " + final["org"]
764
asp = "AS: " + final["as"]
765
lat2 = str(final["lat"])
766
final_lat = "LAT: {}".format(lat2)
767
lon2 = str(final["lon"])
768
final_lon = "LONG: {}".format(lon2)
769
zip_data = "ZIP/POSTAL-CODE: " + final["zip"]
770
link = "https://www.google.com/maps/place/{},{}".format(lat2, lon2)
771
print(Font.Color.YELLOW + "\n[v]" + Font.Color.WHITE + ip)
772
print(Font.Color.YELLOW + "[v]" + Font.Color.WHITE + country)
773
print(Font.Color.YELLOW + "[v]" + Font.Color.WHITE + country_code)
774
print(Font.Color.YELLOW + "[v]" + Font.Color.WHITE + region)
775
print(Font.Color.YELLOW + "[v]" + Font.Color.WHITE + regionName)
776
print(Font.Color.YELLOW + "[v]" + Font.Color.WHITE + city)
777
print(Font.Color.YELLOW + "[v]" + Font.Color.WHITE + timezone)
778
print(Font.Color.YELLOW + "[v]" + Font.Color.WHITE + isp)
779
print(Font.Color.YELLOW + "[v]" + Font.Color.WHITE + org)
780
print(Font.Color.YELLOW + "[v]" + Font.Color.WHITE + asp)
781
print(Font.Color.YELLOW + "[v]" + Font.Color.WHITE + final_lat)
782
print(Font.Color.YELLOW + "[v]" + Font.Color.WHITE + final_lon)
783
print(Font.Color.YELLOW + "[v]" + Font.Color.WHITE + zip_data)
784
print(Font.Color.GREEN +
785
"\n[+]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Website", "Default", "Maps"))
786
sleep(2)
787
print(Font.Color.YELLOW + "[v]" + Font.Color.WHITE + link)
788
f = open(report, "a")
789
f.write(Language.Translation.Translate_Language(
790
filename, "Report", "Default", "Date").format(Date) + "\r\n")
791
f.write(ip + "\r\n")
792
f.write(country + "\r\n")
793
f.write(country_code + "\r\n")
794
f.write(region + "\r\n")
795
f.write(regionName + "\r\n")
796
f.write(city + "\r\n")
797
f.write(timezone + "\r\n")
798
f.write(isp + "\r\n")
799
f.write(org + "\r\n")
800
f.write(asp + "\r\n")
801
f.write(final_lat + "\r\n")
802
f.write(final_lon + "\r\n")
803
f.write(zip_data + "\r\n")
804
f.close()
805
data = {
806
"Geolocation": {
807
"Latitude": lat2.replace(" ", "%20"),
808
"Longitude": lon2.replace(" ", "%20")
809
}
810
}
811
812
with open(report_Ip, "w", encoding='utf-8') as outupt:
813
json.dump(data, outupt, ensure_ascii=False, indent=4)
814
Map.Creation.mapWeb(report_Ip, lat2, lon2, username)
815
else:
816
print(Font.Color.RED + "[!]" + Font.Color.WHITE +
817
Language.Translation.Translate_Language(filename, "Website", "Default", "NoResponse"))
818
choice = int(input(
819
Font.Color.BLUE + " \n[+]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Website", "Questions", "Whois") + Font.Color.GREEN + "[#MR.HOLMES#]" + Font.Color.WHITE + "-->"))
820
if choice == 1:
821
Web.whois_lookup(username, report, Mode)
822
else:
823
num = None
824
number = False
825
email = False
826
email2 = False
827
choice = int(input(
828
Font.Color.BLUE + "\n[?]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Default", "Dorks", "None") + Font.Color.GREEN + "[#MR.HOLMES#]" + Font.Color.WHITE + "-->"))
829
if choice == 1:
830
Web.google_dork(username, number, num,email,email2)
831
else:
832
choice = int(input(
833
Font.Color.BLUE + "\n[?]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Website", "Questions", "Repu") + Font.Color.GREEN + "[#MR.HOLMES#]" + Font.Color.WHITE + "-->"))
834
if choice == 1:
835
Web.Reputation(username, report)
836
else:
837
choice = int(input(
838
Font.Color.BLUE + "\n[?]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Website", "Questions", "Soc") + Font.Color.GREEN + "[#MR.HOLMES#]" + Font.Color.WHITE + "-->"))
839
if choice == 1:
840
Web.Profiles(username, report)
841
else:
842
choice = int(input(
843
Font.Color.BLUE + "\n[?]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Website", "Questions", "Robots") + Font.Color.GREEN + "[#MR.HOLMES#]" + Font.Color.WHITE + "-->"))
844
if choice == 1:
845
Web.Robots(username, report)
846
else:
847
choice = int(input(
848
Font.Color.BLUE + "\n[?]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Website", "Questions", "Ports") + Font.Color.GREEN + "[#MR.HOLMES#]" + Font.Color.WHITE + "-->"))
849
if choice == 1:
850
Web.Ports(username, report)
851
else:
852
choice = int(input(
853
Font.Color.BLUE + "\n[?]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Website", "Questions", "Traceroute") + Font.Color.GREEN + "[#MR.HOLMES#]" + Font.Color.WHITE + "-->"))
854
if choice == 1:
855
Web.trace(username, report)
856
857
f = open(report, "a")
858
f.write(Language.Translation.Translate_Language(
859
filename, "Report", "Default", "By"))
860
f.close()
861
print(Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Default", "Report", "None") +
862
report)
863
Notification.Notifier.Start(Mode)
864
Creds.Sender.mail(report, username)
865
choice = int(input(
866
Font.Color.BLUE + "\n[?]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Transfer", "Question", "None") + Font.Color.GREEN + "[#MR.HOLMES#]" + Font.Color.WHITE + "-->"))
867
if choice == 1:
868
FileTransfer.Transfer.File(report, username, ".txt")
869
Encoding.Encoder.Encode(report)
870
inp = input(Language.Translation.Translate_Language(
871
filename, "Default", "Continue", "None"))
872
873