neilharvey / FileSignatures

A small library for detecting the type of a file based on header signature (also known as magic number).
MIT License
250 stars 41 forks source link

Password protected xlsx #17

Open jpawar opened 5 years ago

jpawar commented 5 years ago

The library does recognize xlsx format, however the password protected xlsx is not recognized because the header bytes are different for password protected spreadsheet. Is there a possibility that this feature could be added?

neilharvey commented 5 years ago

Hey, I've had a look at what happens to an Excel file when you password protect it, it looks as though it's being wrapped as a compound file binary.

In theory if we know the storage type we should be able to identify it as an Excel file - I'll have a proper look and see if I can work out what it should be.