X-Git-Url: https://git.nihav.org/?a=blobdiff_plain;f=nihav-registry%2Fsrc%2Fdetect.rs;h=cf178757e5509d304385c860db2841979c5c1403;hb=217de10bc01258d3a479c2784d6c5542c30b0f63;hp=bb452b2a69a8cec0fdea24f625554417ebd6a0de;hpb=88fd1059c144439b922c31baa61fcf3e93f608f0;p=nihav.git diff --git a/nihav-registry/src/detect.rs b/nihav-registry/src/detect.rs index bb452b2..cf17875 100644 --- a/nihav-registry/src/detect.rs +++ b/nihav-registry/src/detect.rs @@ -176,11 +176,11 @@ impl<'a> CC<'a> { CC::Le(ref arg) => { arg.le(src) }, CC::Gt(ref arg) => { arg.gt(src) }, CC::Ge(ref arg) => { arg.ge(src) }, - CC::Str(str) => { - let mut val: Vec = vec![0; str.len()]; + CC::Str(strng) => { + let mut val: Vec = vec![0; strng.len()]; let res = src.peek_buf(val.as_mut_slice()); if res.is_err() { return false; } - val == str + val == strng } } } @@ -222,6 +222,12 @@ const DETECTORS: &[DetectConditions] = &[ &CC::Str(b"moov")), &CC::Str(b"ftyp")) }], }, + DetectConditions { + demux_name: "gif", + extensions: ".gif", + conditions: &[CheckItem{offs: 0, cond: &CC::Or(&CC::Str(b"GIF87a"), + &CC::Str(b"GIF89a")) }], + }, DetectConditions { demux_name: "mov", extensions: ".mov", @@ -403,6 +409,11 @@ const DETECTORS: &[DetectConditions] = &[ conditions: &[CheckItem{offs: 0, cond: &CC::Str(b"BMVi") }, CheckItem{offs: 32, cond: &CC::Str(b"DATA")}], }, + DetectConditions { + demux_name: "sga", + extensions: ".dtv,.avc", + conditions: &[], + }, DetectConditions { demux_name: "vmd", extensions: ".vmd",