来自魔法文件格式手册规则的格式应该是
offset type value message
例如:
0 string MZ
>0x18 leshort <0x40 MS-DOS executable
>0x18 leshort >0x3f extended PC executable (e.g., MS Windows)
使用这个上下文,我试图理解魔术文件,例如这个其中有类似的规则
# DIY-Thermocam raw data
0 name diy-thermocam-parser
>0 beshort x scale %d-
第一条规则是什么意思?至少从手册页来看,名称不是有效类型。并且没有测试组件。
答案1
您正在查看的联机帮助页不适合您正在查看的软件版本
doc
该 github 站点目录中的联机帮助页显示:
name Define a ``named'' magic instance that can be called
from another use magic entry, like a subroutine
call. Named instance direct magic offsets are rela-
tive to the offset of the previous matched entry,
but indirect offsets are relative to the beginning
of the file as usual. Named magic entries always
match.