h2non / filetype

Fast, dependency-free Go package to infer binary file types based on the magic numbers header signature
https://pkg.go.dev/github.com/h2non/filetype?tab=doc
MIT License
2.13k stars 177 forks source link

Support java class files #142

Open mikewiacek opened 8 months ago

mikewiacek commented 8 months ago

Java class files and MachO FAT binaries have the same magic number '0xCAFEBABE'. It's important to inspect the following 8 bytes to disambiguate the two.