Analysis of a File Magic Pattern Language
摘要
An important method for the identification of le types uses what are commonly called magic patterns. Each such pattern typically species the occurrence of some characteristically identifying data at one or more locations within a file. A large and surprisingly complex database of magic patterns has organically evolved over several decades, and forms the basis of very widely used file-identification programs and modules within more complex programs. The language used for specifying these patterns has also evolved organically over this time. This paper studies this language, providing a systematic description and parser, in turn enabling further study of this database that has interesting theoretical and practical implications.