summarylogtreecommitdiffstats
path: root/file-type-detection.patch
blob: abff0c94a00f3d89c1044a9ac0605e8611c783ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--- rarcrack.h	2007-10-18 09:18:12.000000000 -0600
+++ rarcrack.h.fix	2013-05-30 14:14:55.572552968 -0600
@@ -31,10 +31,10 @@
 
 char default_ABC[] = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
 
-const char CMD_DETECT[] = "file -i -b %s"; //this command return what is the file mime type
+const char CMD_DETECT[] = "file -b --mime-type %s"; //this command return what is the file mime type
 
 const char* TYPE[] = {"rar",		"7z",		"zip", ""}; //the last "" signing this is end of the list
-const char* MIME[] = {"application/x-rar", "application/octet-stream", "application/x-zip", ""};
+const char* MIME[] = {"application/x-rar", "application/x-7z-compressed", "application/zip", ""};
 const char* CMD[] = {"unrar t -y -p%s %s 2>&1", "7z t -y -p%s %s 2>&1", "unzip -P%s -t %s 2>&1", ""};
 
 #define PWD_LEN 100