shethjenil commited on
Commit
3878696
·
verified ·
1 Parent(s): 4132997

Upload 2 files

Browse files
Files changed (3) hide show
  1. .gitattributes +1 -0
  2. HIDEFILE.exe +3 -0
  3. hide.py +22 -0
.gitattributes CHANGED
@@ -36,3 +36,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
36
  CHATGPT.exe filter=lfs diff=lfs merge=lfs -text
37
  SECRIMG.exe filter=lfs diff=lfs merge=lfs -text
38
  SONG_RECOGNIZER.exe filter=lfs diff=lfs merge=lfs -text
 
 
36
  CHATGPT.exe filter=lfs diff=lfs merge=lfs -text
37
  SECRIMG.exe filter=lfs diff=lfs merge=lfs -text
38
  SONG_RECOGNIZER.exe filter=lfs diff=lfs merge=lfs -text
39
+ HIDEFILE.exe filter=lfs diff=lfs merge=lfs -text
HIDEFILE.exe ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:34fbeede4baf2b9d56d0a177fe3201799b560d3a007083d38c63d01742a86db4
3
+ size 10083677
hide.py ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from tkinter.filedialog import askopenfilename , asksaveasfilename , askdirectory
2
+ from tkinter.messagebox import showinfo
3
+ from zipfile import ZipFile
4
+ from os import walk , path
5
+ from io import BytesIO
6
+ def get_all_file_paths(directory):
7
+ file_paths = []
8
+ for root, directories, files in walk(directory):
9
+ for filename in files:
10
+ file_paths.append(path.join(root, filename))
11
+ return file_paths
12
+ def folder_to_zip_file_bytes(folder_path):
13
+ zip_file_bytes = BytesIO()
14
+ with ZipFile(zip_file_bytes, "w") as zip_file:
15
+ for file_path in get_all_file_paths(folder_path):
16
+ zip_file.write(file_path, file_path.split("/")[-1])
17
+ return zip_file_bytes.getvalue()
18
+ def combine_files(main:str, bindfolder:str):
19
+ extension = main.split(".")[-1]
20
+ open(asksaveasfilename(filetypes=[("HIDDEN FILE",[f"*.{extension}"])],initialfile=f"hidden.{extension}"), 'wb').write(open(main, 'rb').read()+folder_to_zip_file_bytes(bindfolder))
21
+ showinfo("HIDDEN FILE","You can use this tool to hide folders inside a file.")
22
+ combine_files(askopenfilename(),askdirectory())