Jump to content

DAT file decode

Go to solution Solved by Lunar knight,

ok thanks for the help.

 

Just now, Lunar knight said:

dose any one know how to decode "DAT" type files.

Where is the .DAT file from like a game or a code?

Reminder⚠️

I'm just speaking from experience so what I say may not work 100%

Please try searching up the answer before you post here but I am always glad to help

Link to comment
https://linustechtips.com/topic/1219145-dat-file-decode/#findComment-13796373
Share on other sites

Link to post
Share on other sites

DAT files are the same as other file formats, ZIP, 7Z, MP4, AVI, DOC, XLS, HTML, etc all hint at a specific format that programs can expect the contents of a file to be organized in.  File types like DAT and BIN are not the same.  They primarily serve as a way to distinguish them from other files, and provide a general hint about what kind of data the file contains.  However the specific way the content of the file is organized on disk is entirely up to the developers who wrote the software the read and write to those files.  In some cases there may be a standalone viewer that can be used to view the contents of the file (often there isn't) but even if there is, it's usually an program used internally by the company to debug issues with the software, and not available for release/sale to the public.

 

TL;DR find the people who wrote the software, and beg.

Link to comment
https://linustechtips.com/topic/1219145-dat-file-decode/#findComment-13797666
Share on other sites

Link to post
Share on other sites

Or to expand on what others have said, check the magic bytes of the file header. For instance, the first few bytes of a PNG is

.PNG....

a PDF's is 

%PDF-

https://en.wikipedia.org/wiki/List_of_file_signatures refer to Wikipedia for more, you might find the magic bytes appear in this table

Link to comment
https://linustechtips.com/topic/1219145-dat-file-decode/#findComment-13797782
Share on other sites

Link to post
Share on other sites

9 hours ago, fake_brogrammer said:

Or to expand on what others have said, check the magic bytes of the file header. For instance, the first few bytes of a PNG is


.PNG....

a PDF's is 


%PDF-

https://en.wikipedia.org/wiki/List_of_file_signatures refer to Wikipedia for more, you might find the magic bytes appear in this table

There is caveat to know and account for if you plan to use it for something else that this exact project

 

- The magic bytes tells you if a file might be of a certain type.

- Extensions are not to be trusted.

- If extension match the magic byte the file is still not necessarily that type either

 

The only true way to know what a file is really is to :

If you think it's a PNG, read it using the PNG decoder and if it load the file IS a PNG

Link to comment
https://linustechtips.com/topic/1219145-dat-file-decode/#findComment-13799170
Share on other sites

Link to post
Share on other sites

On 7/7/2020 at 8:43 PM, Lunar knight said:

 

Hex editor, not text editor. Its output should look similar to this:

Download HxD Hex Editor

 

As other have said ".dat" is typically short for "data", so it could contain anything really. Whatever the developer of the software wanted to store in it. It could be encrypted, it could be compressed, it could have "magic bytes" or it might not. If you know what software uses it and find out when it reads from the file, then you might begin to guess at what's in there. Easiest option is if the developer tells you, otherwise you might need some reverse engineering.

Remember to either quote or @mention others, so they are notified of your reply

Link to comment
https://linustechtips.com/topic/1219145-dat-file-decode/#findComment-13800529
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×