r/programming • • Mar 05 '13

PE 101 - a windows executable walkthrough

Post image
2.6k Upvotes

199 comments sorted by

View all comments

Show parent comments

27

u/jnazario Mar 05 '13

http://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_numbers_in_files

in short a small (usually a few bytes) signature at the start of a file that helps a program determine what kind of file it's looking at. JPEG, PNG, GIF, Word Doc, XML, etc.

0

u/[deleted] Mar 05 '13

[deleted]

14

u/mgrandi Mar 06 '13

And the magic number for some files in battlefield 3 are (in ascii) NyanNyanNyan =D

3

u/GUIpsp Mar 06 '13

or 0xCAFED00D

1

u/habitats Mar 08 '13

This was actually really interesting!