CYB3RMX/Qu1cksc0pe

MacOS issues - Home directory location is wrong and strings command option incorrect

Closed this issue · 1 comments

Description:
MacOS (at least 11.6) puts user directories into /Users instead of /home. Additionally, the "strings" command on MacOS 11.6 doesn't support long options, so it needs to use "-a" instead of "--all".

Example fixes:

     if args.file:
         if os.path.exists(args.file):
-            command = f"strings --all {args.file} > temp.txt"
-            os.system(command)
+            if sys.platform == "darwin":
+                command = f"strings -a {args.file} > temp.txt"
+                os.system(command)
+            else:
+                command = f"strings --all {args.file} > temp.txt"
+                os.system(command)
+            home=f"/home"
+            if sys.platform == "darwin":
+                home=f"/Users"
+
             try:
-                directory = f"/home/{username}/sc0pe_Base/sc0pe_VT_apikey.txt"
+                directory = f"{home}/{username}/sc0pe_Base/sc0pe_VT_apikey.txt"

The home directory is set in 4 places in qu1cksc0pe.py and 3 places in Modules/hashScanner.py:

qu1cksc0pe.py:284:                directory = f"/home/{username}/sc0pe_Base/sc0pe_VT_apikey.txt"
qu1cksc0pe.py:340:            if os.path.exists(f"/home/{username}/sc0pe_Base/"):
qu1cksc0pe.py:343:                os.system(f"mkdir /home/{username}/sc0pe_Base/")
qu1cksc0pe.py:346:            apifile = open(f"/home/{username}/sc0pe_Base/sc0pe_VT_apikey.txt", "w")
Modules/hashScanner.py:55:if os.path.exists(f"/home/{username}/sc0pe_Base/"):
Modules/hashScanner.py:58:    os.system(f"mkdir /home/{username}/sc0pe_Base/")
Modules/hashScanner.py:61:install_dir = f"/home/{username}/sc0pe_Base"

Qu1cksc0pe is designed for Linux distros like Kali, Parrot etc. I'll look for MacOS optimizations later. Thanks for the report and solutions :)