Hi friends
is it possible to read and understand all the hex values of a file???
32 replies to this topic
#1
Posted 01 September 2011 - 08:11 AM
|
|
|
#2
Posted 01 September 2011 - 08:23 AM
if I uderstand your question, it depends from the file you're looking at. some files are easy to read if you look at their hexcode.on the other if you take a look at some executables for example, you'll find a lot of code that cannot be understood by hex.
#3
Posted 01 September 2011 - 08:36 AM
Your question has no context, and therefore no meaning. What kind of a file are you looking at? Is it a text file? In that case, the hex representation will be filled with the ASCII or Unicode character values of the file. If it's an executable, then the hex will contain the machine code or byte-code that comprises the program. If it's a resource file, then the hex could represent anything. It depends on the structure of the file.
Without structure, looking at the hex is meaningless. It is possible through heuristics to decypher some raw hex, but depending on whether the structured data is compressed, formatted, encrypted, there's no guarantee you'll be able to figure it out. It depends on the author of the file and how he/she formatted the file.
To explain more simply: A hex editor is really only showing you the raw binary representation of the file on the disk. Whether or not you can understand the file completely depends on you and whether you understand the file's structure or not.
Without structure, looking at the hex is meaningless. It is possible through heuristics to decypher some raw hex, but depending on whether the structured data is compressed, formatted, encrypted, there's no guarantee you'll be able to figure it out. It depends on the author of the file and how he/she formatted the file.
To explain more simply: A hex editor is really only showing you the raw binary representation of the file on the disk. Whether or not you can understand the file completely depends on you and whether you understand the file's structure or not.
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
– Douglas Hofstadter, Gödel, Escher, Bach: An Eternal Golden Braid
#4
Posted 01 September 2011 - 10:06 AM
Well thank you friends for replying
well i am looking for resource file for now.....I want to know the contents of File is there any way other than hex editor...
well i am looking for resource file for now.....I want to know the contents of File is there any way other than hex editor...
#5
Posted 01 September 2011 - 12:44 PM
kylelendo said:
Hi friends
is it possible to read and understand all the hex values of a file???
is it possible to read and understand all the hex values of a file???
Long answer: it depends on your background, the type of file, your knowledge of the file format, etc, etc, etc
For example, looking at the hex values of a text file is pretty simple (to the point of nearly stupid).
Looking at the hex values of a .exe can be painful, and requires understanding very low-level programming instructions, a rather uncommon skill.
Looking at the hex values of a PDF helped me identify the cause of an issue a customer was having (both files were .PDF files, but one was version 1.3, the other was version 1.4).
Looking at the hex values of a data file by anonymous program XYZ will depend entirely on its (usually unpublished) file format.
Generally, if you want to know what a file MEANS, open it in a program that is meant to display its contents.
#6
Posted 01 September 2011 - 11:06 PM
so is it possible to understand all the contents of resource file.....I am well versed with C,C++,JAVA,VB.NET,Assembly Language
#7
Posted 02 September 2011 - 04:35 AM
Yes, it's possible, but that doesn't mean it's easy. As an example, create a Word 2000 document. Make sure it has a table, headers, footers. Save it. Now open it with your hex editor. While you can pick out the text fairly easily, can you spot the code that starts the bold font effect?
Many resource files represent the binary form of the in-memory data structures the program uses to store the data. Word 97-2007 Binary File Format ( Doc ) Specification-
Many resource files represent the binary form of the in-memory data structures the program uses to store the data. Word 97-2007 Binary File Format ( Doc ) Specification-
#8
Posted 02 September 2011 - 05:49 AM
one more important question that comes in my mind......now there are different file types that run on windows......there is a category of executable files....Data Files.........media files..........resource files....so basically is it that every file in windows can be classified under any of this category..??
#9
Posted 02 September 2011 - 06:42 AM
There are only two types of files: files that contain executable code, and files that don't. An mp3 is a data file. It is also a media file because the data it contains is intended to be parsed and played as sound. A resource file is a data file that contains information a program needs to run. Heck, event files that contain executable code can be modified as data.
You are thinking that the nature of what the data holds somehow makes it different. It doesn't. What is the difference between a .doc file and a .txt file? MS Word can read both, Notepad can't. They may both contain the same information from a human perspective, but in a hex editor they are completely different. Now, embed an mp3 in your .doc file. Has it changed from a data file to a media file? I wouldn't say it has.
"The trick is not to bend the spoon. That is impossible. Instead, you must realize there is no spoon."
You are thinking that the nature of what the data holds somehow makes it different. It doesn't. What is the difference between a .doc file and a .txt file? MS Word can read both, Notepad can't. They may both contain the same information from a human perspective, but in a hex editor they are completely different. Now, embed an mp3 in your .doc file. Has it changed from a data file to a media file? I wouldn't say it has.
"The trick is not to bend the spoon. That is impossible. Instead, you must realize there is no spoon."
#10
Posted 02 September 2011 - 07:47 AM
Allright so...Suppose i am looking at a game data file...well surely it might contain graphics ,sound etc etc....so how can i recognize which part of the file is sound......which part is graphics etc etc???
#11
Posted 02 September 2011 - 08:45 AM
kylelendo said:
Allright so...Suppose i am looking at a game data file...well surely it might contain graphics ,sound etc etc....so how can i recognize which part of the file is sound......which part is graphics etc etc???
There are only two ways: The easy way and the hard way.
The easy way is by looking at documentation from the game's author about the structure of their files. If they don't publish this (and not many do), then the only way is the hard way: through heuristics (figuring it out for yourself), either by trial and error, or some systematic approach where you try to recognize familiar groups of bytes or patterns.
EDIT: If the game file you're referring to is an executable, then there is perhaps a third way: by using a decompiler. But this can be just as difficult if the author used code obfuscation or other tactics to make reverse-engineering difficult. It's not impossible, just improbable.
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
– Douglas Hofstadter, Gödel, Escher, Bach: An Eternal Golden Braid
#12
Posted 03 September 2011 - 02:59 AM
Instead of reading the values..I can start deleting it..and observe d result.but in case of non executable files the program has to be called by an corresponding executable file...this might take much time...so is there any other way I can check those Files...????
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









