aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lualib/lua_magic/heuristics.lua5
-rw-r--r--lualib/lua_magic/types.lua8
2 files changed, 12 insertions, 1 deletions
diff --git a/lualib/lua_magic/heuristics.lua b/lualib/lua_magic/heuristics.lua
index 8fb83bb0d..700932051 100644
--- a/lualib/lua_magic/heuristics.lua
+++ b/lualib/lua_magic/heuristics.lua
@@ -244,7 +244,8 @@ local function detect_archive_flaw(part, arch, log_obj)
jar = 0,
odt = 0,
odp = 0,
- ods = 0
+ ods = 0,
+ apk = 0,
} -- ext + confidence pairs
-- General msoffice patterns
@@ -268,6 +269,8 @@ local function detect_archive_flaw(part, arch, log_obj)
res.pptx = res.pptx + 30
elseif file == 'META-INF/MANIFEST.MF' then
res.jar = res.jar + 40
+ elseif file == 'AndroidManifest.xml' then
+ res.apk = res.apk + 60
end
end
diff --git a/lualib/lua_magic/types.lua b/lualib/lua_magic/types.lua
index 2b2545d87..5626b3445 100644
--- a/lualib/lua_magic/types.lua
+++ b/lualib/lua_magic/types.lua
@@ -39,6 +39,14 @@ local types = {
ct = 'application/x-java-applet',
type = 'executable',
},
+ jar = {
+ ct = 'application/java-archive',
+ type = 'archive',
+ },
+ apk = {
+ ct = 'application/vnd.android.package-archive',
+ type = 'archive',
+ },
-- text
rtf = {
ct = "application/rtf",