Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Lucksi
GitHub Repository: Lucksi/Mr.Holmes
Path: blob/master/Core/Support/Dorks.py
1071 views
1
# ORIGINAL CREATOR: Luca Garofalo (Lucksi)
2
# AUTHOR: Luca Garofalo (Lucksi)
3
# Copyright (C) 2021-2023 Lucksi <[email protected]>
4
# License: GNU General Public License v3.0
5
6
from Core.Support import Font
7
from Core.Support import Language
8
from time import sleep
9
10
filename = Language.Translation.Get_Language()
11
filename
12
13
14
class Search:
15
16
@staticmethod
17
def dork(username, report, nomefile, Type):
18
print(Font.Color.GREEN + "\n[+]" + Font.Color.WHITE +
19
Language.Translation.Translate_Language(filename, "Dorks", "Generation", "None").format(Type))
20
sleep(2)
21
username = username.replace(" ","+")
22
f = open(report, "a")
23
f.write(Type + "-DORKS:\n\n")
24
f.close()
25
sleep(3)
26
f = open(nomefile, "r")
27
for sites in f:
28
site = sites.rstrip("\n")
29
site = site.replace("{}", username)
30
print(Font.Color.YELLOW + "[v]" + Font.Color.WHITE + site)
31
f = open(report, "a")
32
f.write(site + "\n")
33
f.close()
34
f.close()
35
print(Font.Color.WHITE + Language.Translation.Translate_Language(filename,
36
"Default", "Report", "None") + report)
37
38
@staticmethod
39
def Generator(Type,nomefile,report,phrase,exclusion,data,between,seconddata):
40
print(Font.Color.GREEN + "\n[+]" + Font.Color.WHITE +
41
Language.Translation.Translate_Language(filename, "Dorks", "Generation", "None").format(Type))
42
sleep(2)
43
if Type == "YANDEX":
44
if "before:" in data:
45
data = data.replace("+before:","date:<")
46
elif "after" in data:
47
data = data.replace("+after:","date:>")
48
if between == "True":
49
seconddata = seconddata.replace("before","")
50
seconddata = seconddata.replace("+after","")
51
data = "date:"+ seconddata
52
else:
53
pass
54
data = data.replace("/","")
55
phrase = phrase.replace(" ","+")
56
f = open(report, "a")
57
f.write("\n" + Type + "-DORKS:\n\n")
58
f.close()
59
sleep(3)
60
f = open(nomefile, "r")
61
for sites in f:
62
site = sites.rstrip("\n")
63
if exclusion and data == "None":
64
site = site.replace("{}", phrase)
65
else:
66
site = site.replace("{}", phrase).replace(")","){}".format(data) + "".join(exclusion))
67
print(Font.Color.YELLOW + "[v]" + Font.Color.WHITE + site)
68
f = open(report, "a")
69
f.write(site + "\n")
70
f.close()
71
f.close()
72
print(Font.Color.WHITE + Language.Translation.Translate_Language(filename,
73
"Default", "Report", "None") + report)
74
75
76