commit 8594836: [Project] Lua_magic: Moar patterns

Vsevolod Stakhov vsevolod at highsecure.ru
Fri Sep 6 17:49:16 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-09-06 18:44:02 +0100
URL: https://github.com/rspamd/rspamd/commit/859483618be3602ea3c405f944595f8c0d06e720 (HEAD -> master)

[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',


More information about the Commits mailing list