Expand description
Hierarchical magic byte pattern evaluation engine for format identification.
Structs§
- Magic
Pattern - A signature rule defining magic bytes to inspect in a file header (legacy compatibility).
- Rule
Match Result - Result of evaluating a hierarchical magic rule against a payload source.
Enums§
- Format
Value - Extracted value used for printf-style format interpolation in descriptions.
Functions§
- evaluate_
rule - Evaluates a single
HierarchicalMagicRuleand its child tree against aDetectionSource. - evaluate_
rule_ with_ mode - Evaluates a single
HierarchicalMagicRuleand its child tree against aDetectionSourcewith file mode. - evaluate_
rule_ with_ templates - Evaluates a hierarchical magic rule against a payload source using provided subroutines.
- evaluate_
rule_ with_ templates_ and_ mode - Evaluates a hierarchical magic rule against a payload source using provided subroutines and file mode.
- format_
magic_ description - Formats a libmagic rule description interpolating
%s,%d,%x, etc. specifiers. - varexpand
- Expands
${x?then:else}variable expressions according to mode execution bits, matchingvarexpandinsoftmagic.c.