-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsplash.py
More file actions
78 lines (78 loc) · 3.4 KB
/
Copy pathsplash.py
File metadata and controls
78 lines (78 loc) · 3.4 KB
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
import os, platform, builtins, time, hashlib
original_print = builtins.print
original_input = builtins.input
def ss(manualclear=0, delay=5, color=False):
from mwinst import printme, inputme, clear
if os.name == "nt":
home = f"C:/Users/{os.getlogin()}/"
elif os.name == "posix":
if os.path.exists("/home"):
home = f"/home/{os.getlogin()}/"
else:
home = f"/Users/{os.getlogin()}/"
if not os.path.exists(f"{home}.winstsplash-ignore"):
if not color:
splash = """This project is part of
;;;;;;;;;:#▒;;#▒#▒;#▒:############▒:;;;;;;;;;;;;
;;;;;;;;;:#▒:#▒:;##▒:#▒#▒:;;;#▒;;;;;;;;;;;;;;
;;;;;;;;;::#▒#▒:#▒#▒#▒#▒#▒;:;;#▒;;;;;;;;;;;;;;
;;;;;;;;;::#▒#▒:#▒#▒#▒#▒:###▒;;#▒the:WINST:project:;;;;;
;;;;;;;;;::#▒#▒:#▒#▒#▒#▒;;#▒:;#▒;;;;;;;;;;;;;;
;;;;;;;;;::#▒#▒:#▒#▒:##▒;;#▒:;#▒;;;;;;;;;;;;;;
;;;;;;;;;:;#▒##▒##▒;######▒;;#▒;;;;;;;;;;;;;;
Welcome to the WINST project's first tool, pytextsearch""".replace("#", "@").replace(";", "▓▓").replace(":", "▓").replace("@", " ")
else:
splash = """This project is part of
[green];;;;;;;;;:#▒;;#▒#▒;#▒:############▒:;;;;;;;;;;;;[/green]
[green];;;;;;;;;:#▒:#▒:;##▒:#▒#▒:;;;#▒;;;;;;;;;;;;;;[/green]
[green];;;;;;;;;::#▒#▒:#▒#▒#▒#▒#▒;:;;#▒;;;;;;;;;;;;;;[/green]
[green];;;;;;;;;::#▒#▒:#▒#▒#▒#▒:###▒;;#▒the:WINST:project:;;;;;[/green]
[green];;;;;;;;;::#▒#▒:#▒#▒#▒#▒;;#▒:;#▒;;;;;;;;;;;;;;[/green]
[green];;;;;;;;;::#▒#▒:#▒#▒:##▒;;#▒:;#▒;;;;;;;;;;;;;;[/green]
[green];;;;;;;;;:;#▒##▒##▒;######▒;;#▒;;;;;;;;;;;;;;[/green]
Welcome to the WINST project's first tool, pytextsearch""".replace("#", "@").replace(";", "▓▓").replace(":", "▓").replace("@", " ")
for I in splash.split("\n"):
printme(I)
if os.name == "nt":
osname = "Windows"
elif os.name == "posix":
osname = "Linux or MacOS"
elif os.name == "java":
osname = "unknown(running in JVM)"
else:
osname = "unknown(unknown value)"
printme(f"OS : {osname} on {platform.machine()}")
if manualclear == 1:
inputme("press enter to clear...")
else:
time.sleep(delay)
if not color:
clear(linesprinted)
with open(f"{home}.winstsplash-ignore", "w") as f:
f.write("")
print(f"{'[cyan]'*color}This project is part of the Winst project{'[/cyan]'*color}")
def m095(hashes):
script_file = "splash.py"
with open(script_file, "rb") as f:
script_bytes = f.read()
script_hash = hashlib.sha256(script_bytes).hexdigest()
if not script_hash in hashes:
return "stop", script_hash
elif not len(hashes) == secfeatures:
return "stop", script_hash
else:
return "continue", script_hash
def k095(hashes):
script_file = "mwinst.py"
with open(script_file, "rb") as f:
script_bytes = f.read()
script_hash = hashlib.sha256(script_bytes).hexdigest()
if not script_hash in hashes:
return "stop", script_hash
elif not len(hashes) == secfeatures:
return "stop", script_hash
else:
return "continue", script_hash
secfeatures = 2
if __name__ == "__main__":
printme("This is meant to be used as a module and not as an application.")