From: Vsevolod Stakhov Date: Fri, 6 Sep 2019 17:44:02 +0000 (+0100) Subject: [Project] Lua_magic: Moar patterns X-Git-Tag: 2.0~261 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=859483618be3602ea3c405f944595f8c0d06e720;p=rspamd.git [Project] Lua_magic: Moar patterns --- 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',