Solved

.doc, .xls, .ppt Magic Bytes?

Posted on 2006-10-27
3
1,163 Views
Last Modified: 2008-01-09
Does anyone know the true "magic bytes" for .doc, .xls and .ppt.

I have come across the following:

.ppt: d0cf11e0a1b11ae100000000
.xls:  d0cf11e0a1b11ae100
.doc: d0cf11e0a1b11ae1

The problem with those magic bytes is that both xls and ppt's have the extra zeros on the end too.

I have also seen:

fdff at offset 512

this is also common to all office documents.


How can I tell the difference between .doc, .xls and .ppt?

And soon coming with office 2k7 .docx, .xlsx, .pptx?

Thanks

Matt
0
Comment
Question by:essentialtalk
3 Comments
 
LVL 6

Accepted Solution

by:
SCDMETA earned 500 total points
ID: 17824502
1) Could you use the extension?

2) http://www.wotsit.org/default.asp  
Might be a good resource for you.

3) http://www.google.com/codesearch?hl=en&lr=&q=d0cf11e0&btnG=Search

This is a google code search for the OLE signature.  You might be able to find some more magic bytes (or references) by looking at existing code.

Good luck
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Fibonacci challenge 11 84
countAbc challenge 9 50
nestparen challenge 4 57
When i run adoquery my application freezes 26 102
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now