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.1k stars 175 forks source link

Add pcap and dmg matchers #94

Closed andrewstucki closed 3 years ago

andrewstucki commented 3 years ago

This adds support for pcap and dmg detection, which, at least in my use-case are useful.

Here's the IANA link for the pcap mime type: https://www.iana.org/assignments/media-types/application/vnd.tcpdump.pcap For the dmg mime type I took a look at what Debian uses since there's nothing official: https://github.com/pexip/os-mime-support/blob/master/mime.types