From 859483618be3602ea3c405f944595f8c0d06e720 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 6 Sep 2019 18:44:02 +0100 Subject: [PATCH] [Project] Lua_magic: Moar patterns --- lualib/lua_magic/patterns.lua | 9 +++++++++ lualib/lua_magic/types.lua | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/lualib/lua_magic/patterns.lua b/lualib/lua_magic/patterns.lua index dd723f6e8..003073cab 100644 --- a/lualib/lua_magic/patterns.lua +++ b/lualib/lua_magic/patterns.lua @@ -202,6 +202,15 @@ local patterns = { }, } }, + iso = { + matches = { + { + string = [[\x{01}CD001\x{01}]], + position = {'>=', 0x8000 + 7}, -- first 32k is unused + weight = 60, + }, + } + }, -- Apple is a 'special' child: this needs to be matched at the data tail... dmg = { matches = { diff --git a/lualib/lua_magic/types.lua b/lualib/lua_magic/types.lua index 20089c9c2..b3af668c8 100644 --- a/lualib/lua_magic/types.lua +++ b/lualib/lua_magic/types.lua @@ -97,6 +97,10 @@ local types = { ct = 'application/x-dmg', type = 'archive', }, + iso = { + ct = 'application/x-iso', + type = 'archive', + }, szdd = { -- in fact, their MSDOS extension is like FOO.TX_ or FOO.TX$ ct = 'application/x-compressed', type = 'archive', -- 2.39.5