Here is a Python-based file format detector that can identify common file types by inspecting their file signatures (also known as magic numbers). This script reads the first few bytes of a file and matches them against known signatures.
Features:
-
Detects common formats: JPEG, PNG, PDF, MP3, ZIP, MP4, EXE, and more.
-
Uses file headers (magic numbers) for identification, not file extensions.
-
Lightweight and easily extendable with more signatures.
To Extend:
You can add more file signatures by expanding the FILE_SIGNATURES dictionary with known hex patterns.
Would you like a web interface or command-line enhancements for this detector?
Share this Page your favorite way: Click any app below to share.