November 29, 2010

File Magic Numbers in Header to differentiate between files

Hi everyone,
I just came to know about the file magic numbers

Its good that, we can identify the file by converting the file to ASCII even someone changes the file extension manually.

I personally tested this by creating one GIF file and saw the file ASCII values are starting with GIF89a.
Later I manually changed the file extension to JPEG and I verified the ASCII values surprised that still the file ASCII values aren't changed. Its GIF89a.

So, I understand one thing, that, if someone changes the file extension to some unknown type, we can easily find the original file extension by this method.

To see the file ASCII values, use hexdump tool.

See the screeshots

See the output ever after changing file extn

Please send your comments and feedback to me
Post a Comment

Featured Post

Java Introdcution

Please send your review and feedback to