commit 9ce8ae9: [Minor] Add alzip magic numbers

Vsevolod Stakhov vsevolod at highsecure.ru
Sun Sep 20 21:56:05 UTC 2020


Author: Vsevolod Stakhov
Date: 2020-09-20 22:55:36 +0100
URL: https://github.com/rspamd/rspamd/commit/9ce8ae98039f5cdbb243872552be3c0e3fdd0ecc (HEAD -> master)

[Minor] Add alzip magic numbers

---
 lualib/lua_magic/patterns.lua | 20 ++++++++++++++++++++
 lualib/lua_magic/types.lua    |  8 ++++++++
 2 files changed, 28 insertions(+)

diff --git a/lualib/lua_magic/patterns.lua b/lualib/lua_magic/patterns.lua
index 371d99a5a..d04c3c57e 100644
--- a/lualib/lua_magic/patterns.lua
+++ b/lualib/lua_magic/patterns.lua
@@ -254,6 +254,26 @@ local patterns = {
       },
     }
   },
+  egg = {
+    -- ALZip egg
+    matches = {
+      {
+        string = [[EGGA]],
+        weight = 60,
+        relative_position = 0,
+      },
+    }
+  },
+  alz = {
+    -- ALZip alz
+    matches = {
+      {
+        string = [[ALZ\x{01}]],
+        weight = 60,
+        relative_position = 0,
+      },
+    }
+  },
   -- 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 d15eec6e1..3a104a537 100644
--- a/lualib/lua_magic/types.lua
+++ b/lualib/lua_magic/types.lua
@@ -117,6 +117,14 @@ local types = {
     ct = 'application/x-zoo',
     type = 'archive',
   },
+  egg = {
+    ct = 'application/x-egg',
+    type = 'archive',
+  },
+  alz = {
+    ct = 'application/x-alz',
+    type = 'archive',
+  },
   xar = {
     ct = 'application/x-xar',
     type = 'archive',


More information about the Commits mailing list