How to reliably detect file types? [duplicate]
File type detection tools: Mime Type Detection Utility DROID (Digital Record Object Identification) ftc – File Type Classifier JHOVE, JHOVE2 NLNZ Metadata Extraction Tool Apache Tika TrID, TrIDNet Oracle Outside In (commercial) Forensic Innovations File Investigator TOOLS (commercial)