
Tech
Catching "invoice.pdf.exe" before you open it: a tool that identifies a file's real type from its first bytes
Windows hides file extensions by default. So an executable named invoice.pdf.exe shows up in Explorer as invoice.pdf . Give it a PDF icon and there is nothing left to tell it apart by looking.
An extension, though, is only a claim . A PDF always starts with %PDF- . A Windows executable always starts with MZ . A file can call itself anything it likes, but its first bytes are the contents themselves, and they cannot lie.
This post is about a Windows app I built that reads those first b...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to