registry: add detection for MOV format
authorKostya Shishkov <kostya.shishkov@gmail.com>
Mon, 27 Apr 2020 09:32:55 +0000 (11:32 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Mon, 27 Apr 2020 09:32:55 +0000 (11:32 +0200)
nihav-registry/src/detect.rs

index 96b9440a83cc88b16377903d1ffe2d33d77c8beb..aeaa06d408be4996865e7e75732f17825a1aa3f5 100644 (file)
@@ -198,6 +198,21 @@ const DETECTORS: &[DetectConditions] = &[
                                                                &CC::Str(b"ON2fLIST")) },
                      ]
     },
+    DetectConditions {
+        demux_name: "mov",
+        extensions: ".mov",
+        conditions: &[CheckItem{offs: 4, cond: &CC::Or(&CC::Or(&CC::Str(b"mdat"),
+                                                               &CC::Str(b"moov")),
+                                                               &CC::Str(b"ftyp")) }],
+    },
+    DetectConditions {
+        demux_name: "mov",
+        extensions: ".mov",
+        conditions: &[CheckItem{offs:  0, cond: &CC::Str(b"\x00\x00\x00\x08wide") },
+                      CheckItem{offs: 12, cond: &CC::Or(&CC::Or(&CC::Str(b"mdat"),
+                                                                &CC::Str(b"moov")),
+                                                                &CC::Str(b"ftyp")) }],
+    },
     DetectConditions {
         demux_name: "gdv",
         extensions: ".gdv",