Google's AI for file type identification seems pretty good actually
Posted on 2024-02-16: https://opensource.googleblog.com/2024/02/magika-ai-powered-fast-and-efficient-file-type-identification.html
you really can just throw AI at the problem & call it a success. another loss for expert systems?