martinlindhe/feng

Rework magic yaml section

martinlindhe opened this issue · 0 comments

Current impl is limiting:

magic:
  - offset: 0000
    match: D4 76 8E 4B

We want something with multiple conditions, like gnu file has.

Maybe something like:

magic:
  - "0000: = D4 76 8E 4B"     # equals
    - "0004: > be:u32 1000"   # and is greater than

  - "0000: ! be:u32 1234"     # not equal
    - "0004: < le:u32 1500"   # and is less than

Also wanted:

  • minsize: 123 # file size must be at least 123 bytes