Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Lucksi
GitHub Repository: Lucksi/Mr.Holmes
Path: blob/master/MrHolmes.py
1071 views
1
#!/usr/bin/python3
2
# ORIGINAL CREATOR: Luca Garofalo (Lucksi)
3
# AUTHOR: Luca Garofalo (Lucksi)
4
# Copyright (C) 2021-2023 Lucksi <[email protected]>
5
# License: GNU General Public License v3.0
6
7
import os
8
from Core.Support import Menu
9
from Core.Support import Font
10
from Core.Support import Language
11
12
filename = Language.Translation.Get_Language()
13
filename
14
15
class Main:
16
17
@staticmethod
18
def Controll_Display():
19
Interface_file = "Display/Display.txt"
20
if os.path.isfile(Interface_file):
21
d = open(Interface_file,"r",newline=None)
22
conf = d.read().strip("\n")
23
d.close()
24
if conf == "Desktop":
25
pass
26
elif conf == "Mobile":
27
pass
28
else:
29
print(Font.Color.RED + "[!]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Default", "DisplayError", "None"))
30
exit()
31
else:
32
print(Font.Color.RED + "[!]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Default", "NoDisplay", "None") .format(Interface_file))
33
return conf
34
35
def Menu(Mode):
36
Menu.Main.main(Mode)
37
38
if __name__ == "__main__":
39
Mode = Main.Controll_Display()
40
Mode
41
try:
42
Main.Menu(Mode)
43
except KeyboardInterrupt:
44
print(Font.Color.RED + "\n\n[!]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Default", "KeyC", "None"))
45
exit()
46
except ModuleNotFoundError as Error:
47
print(Font.Color.RED + "\n\n[!]" + Font.Color.WHITE + Language.Translation.Translate_Language(filename, "Default", "Internal", "None").format(str(Error)))
48
exit()
49
50