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<u8> = vec![0; str.len()];
+ CC::Str(strng) => {
+ let mut val: Vec<u8> = vec![0; strng.len()];
let res = src.peek_buf(val.as_mut_slice());
if res.is_err() { return false; }
- val == str
+ val == strng
}
}
}
&CC::Str(b"moov")),
&CC::Str(b"ftyp")) }],
},
+ DetectConditions {
+ demux_name: "mov-macbin",
+ extensions: ".mov,.bin",
+ conditions: &[CheckItem{offs: 0, cond: &CC::Eq(Arg::Byte(0))},
+ CheckItem{offs: 0x41, cond: &CC::Str(b"MooV")},
+ CheckItem{offs: 0x7A, cond: &CC::Eq(Arg::Byte(0x81))},
+ CheckItem{offs: 0x7B, cond: &CC::Eq(Arg::Byte(0x81))},
+ CheckItem{offs: 0x84, cond: &CC::Str(b"mdat")}],
+ },
DetectConditions {
demux_name: "yuv4mpeg",
extensions: ".y4m",
conditions: &[CheckItem{offs: 0, cond: &CC::Str(b"DKIF\x00\x00")},
CheckItem{offs: 6, cond: &CC::Ge(Arg::U16LE(32))}],
},
+ DetectConditions {
+ demux_name: "arxel-cnm",
+ extensions: ".cnm",
+ conditions: &[CheckItem{offs: 0, cond: &CC::Str(b"CNM UNR\x00")}],
+ },
DetectConditions {
demux_name: "fcmp",
extensions: ".cmp",