Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

How 2 open .dat :(

Name: Anonymoose 2007-05-24 16:11 ID:kiKTUa6J

Hi 4chan. Please help me open these darn .dat files.
They have an .xls (excel) file in them... but I don't know how to open this .dat file.

You can get the .dat files here: http://www.megaupload.com/?d=PHJBAT6L
or here: http://files-upload.com/247181/Language.rar.html
they're in a rar.



You're my only hope!

Name: Anonymous 2007-05-24 19:25 ID:/MFeiM+j

Please?

Name: Anonymous 2007-05-24 19:40 ID:Heaven

no

Name: Anonymous 2007-05-24 19:40 ID:Heaven

ALSO,
GOTO /comp/

Name: Anonymous 2007-05-24 21:02 ID:/MFeiM+j

ok

Name: Anonymous 2007-05-25 0:07 ID:5l845lSV

Erase is backspace.

Name: Anonymous 2007-05-25 1:50 ID:MZt+YpJ+

I CAN'T HELP YOU!

$ file -kz *
ActionObject.dat:      data
AddDefine.dat:         data
Addition.dat:          data
Addition.dat.zip:      empty
Ancestor.dat:          data
Appearance.dat:        data
AtkTypeData.dat:       data
Augeskill.dat:         data
BanNick.dat:           data
BattleSound.dat:       data
bookdata1.rbf:         data
ChatColor.dat:         data
ChatCommand.dat:       data
ChatTextInfo.dat:      data
Color.dat:             data
DyeingColor.dat:       data
effectData.dat:        data
EmoteFilterData.dat:   data
EtcCommand.dat:        data
Exp.dat:               data
GameStringTable.dat:   data
Help.dat:              data
HelpEvent.dat:         data
item.dat:              data
MapInfo.dat:           data
MapItemSkill.dat:      DBase 3 data file with memo(s) (1247503206 records)
MapObject.dat:         data
MapToolTip.dat:        data
Npc.dat:               data
NpcEvent.dat:          data
NpcLocation.dat:       data
NpcSupplyMenu.dat:     data
QuestData.dat:         data
QuestStepData.dat:     data
ResourceName.dat:      data
ScenarioData.dat:      data
ScenarioStepData.dat:  data
SkillAniSeq.dat:       data
skill.dat:             data
SlangFilterData.dat:   data
SoundInfo.dat:         data
statusbywlv.dat:       data
supply.dat:            data
UIStringTable.dat:     data
WeaponAddName.dat:     data
WeaponAddNameList.dat: data

Name: Anonymous 2007-05-25 2:34 ID:41FfJ4Tp

Are they from some corean mmorpg?

Name: Anonymous 2007-05-25 3:25 ID:OdQsVsuP

You cant touch .dat file if you aintt SANDCORE PROGRAMMER

Name: Anonymous 2007-05-25 8:29 ID:qG+nhJco

Looks compressed. Upload the executable that loads them.

Name: Anonymous 2007-05-25 11:57 ID:NaQzVolx

.dat needs more .NET

Name: Anonymous 2007-05-25 12:13 ID:ZP5ykFr/

>>9
$ touch ActionObject.dat

$

Name: Anonymous 2007-05-25 13:56 ID:me+NyHor

DUCKROLL

Name: Anonymous 2007-05-25 14:27 ID:Heaven

Name: Anonymous 2007-05-25 14:55 ID:me+NyHor

Comparing the files side by side in a hex editor indicates that many of the bytes remain the same in all files. This would indicate to me that some sort of XOR-based algorithm is in place and those sections that are the same will largely be 00s.

How to determine the XOR key? Well, first it is useful to determine how large it is - does it have periodicity? Picking a couple of bytes from the parts of the files that are largely the same and searching for it again in that file shows that the pattern repeats itself every 662 (decimal) bytes.

Next, I picked what looked like a relatively sparse file (i.e. when decrypted will be mostly zeroes) and ran a program on it to count the frequencies at which different bytes appear in the repeated sections of 662 bytes.


/* datstat.c */

#include <stdio.h>
#include <fcntl.h>
#include <io.h>

int main(int argc, char* argv[])
{
    unsigned char buffer[662];
    int frequencies[662*256] = {0};
    int bytes_read = 0;
    int i, j;
    int highest_freq, highest_pos, tmp;

    _setmode(_fileno(stdin), _O_BINARY);

    do {
        bytes_read = fread(buffer, 1, 662, stdin);
        for (i=0;i<bytes_read;i++)
        {
            frequencies[i*256+(int)(buffer[i])]++;
        }
    } while(bytes_read > 0 || !feof(stdin));

    printf("unsigned char key[662] = {\n");
    for(i=0;i<662;i++)
    {
        highest_pos = 0;
        highest_freq = 0;
        for(j=0;j<256;j++)
        {
            tmp = frequencies[i*256+j];
            if (tmp>highest_freq)
            {
                highest_pos = j;
                highest_freq = tmp;
            }
        }
        printf(" 0x%02X", highest_pos);
        if (i<661)
            printf(",");
        if (7==i%8)
            printf("\n");
    }
    printf("};");

    return 0;
}


Running datstat < BanNick.dat spat out a likely key, which I then included in the next program to decode the dat files:

/* datdec.c */

#include <stdio.h>
#include <fcntl.h>
#include <io.h>

unsigned char key[662] = {
 0xA5, 0x93, 0xF7, 0xB5, 0x6C, 0x63, 0x5B, 0x4A,
 0xA6, 0x0A, 0xA8, 0xE0, 0xB3, 0xB9, 0x59, 0xD2,
 0x10, 0x47, 0xFA, 0x4A, 0xCF, 0xD4, 0x3D, 0x07,
 0x44, 0xAC, 0x4B, 0x5E, 0x02, 0x6D, 0x58, 0x7F,
 0x06, 0x6D, 0x7A, 0xFA, 0x31, 0x56, 0xBB, 0x82,
 0xFC, 0x13, 0x6D, 0xF0, 0x67, 0xF0, 0xBD, 0x8B,
 0x32, 0xFC, 0x8B, 0x86, 0x50, 0xB2, 0x79, 0xCA,
 0x99, 0xD9, 0x42, 0xF6, 0xBF, 0xA9, 0x4E, 0xA4,
 0x83, 0x2F, 0x83, 0xEF, 0x28, 0xF3, 0x5D, 0x32,
 0x28, 0xD7, 0x41, 0x11, 0x27, 0x42, 0x0E, 0xBE,
 0x25, 0x7E, 0xF6, 0x75, 0xF7, 0x5F, 0x8C, 0x49,
 0xF8, 0x26, 0x1D, 0x23, 0xFC, 0xA4, 0x44, 0x08,
 0x85, 0xA3, 0xB9, 0x9A, 0x3A, 0x81, 0x6A, 0xE2,
 0x94, 0x1E, 0xCD, 0x4C, 0xDB, 0xF9, 0x74, 0xF3,
 0x51, 0x95, 0xE2, 0x1F, 0xAD, 0x22, 0x9D, 0x0C,
 0xCA, 0x59, 0x84, 0xEE, 0xA1, 0xA8, 0x63, 0x31,
 0x75, 0x8F, 0xC5, 0x05, 0x4D, 0x4A, 0x09, 0x1A,
 0xA7, 0xB0, 0xB8, 0xA8, 0x6B, 0x5B, 0x16, 0xB3,
 0x1E, 0x09, 0xF7, 0x8D, 0x58, 0x42, 0xD4, 0x9C,
 0x78, 0x3B, 0x1E, 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xC6, 0xE1,
 0x08, 0x5A, 0x80, 0x68, 0x94, 0x94, 0x7B, 0xC3,
 0xE5, 0xBA, 0xF8, 0xBB, 0xF2, 0xFD, 0x39, 0x1A,
 0xA8, 0xA0, 0x44, 0x62, 0xD4, 0x4E, 0xE5, 0xBF,
 0x42, 0xB0, 0xF2, 0x3B, 0x26, 0x3F, 0xD2, 0x31,
 0xBC, 0x57, 0x40, 0x04, 0x2C, 0x8D, 0x4D, 0x10,
 0xB0, 0x43, 0xA4, 0xE1, 0xF8, 0x7A, 0x12, 0xA3,
 0xCE, 0xE7, 0x46, 0xDA, 0xF6, 0x48, 0xD5, 0x54,
 0x58, 0xF8, 0x81, 0x5B, 0x61, 0xC1, 0xBA, 0x2F,
 0xA6, 0xF2, 0x65, 0xB3, 0xCA, 0xB2, 0xDD, 0x66,
 0xA2, 0x94, 0x37, 0x95, 0x98, 0x6C, 0xCB, 0xCF,
 0x4D, 0x60, 0xEF, 0x9A, 0x83, 0x42, 0x06, 0x64,
 0x39, 0x1D, 0xBA, 0xBC, 0x17, 0x0D, 0x85, 0xC2,
 0x0D, 0x54, 0x76, 0xDC, 0x38, 0xAB, 0x32, 0xAB,
 0x05, 0xD6, 0x39, 0x3E, 0x98, 0x7B, 0x6A, 0x85,
 0x6F, 0x34, 0xCA, 0x08, 0x42, 0xE3, 0x81, 0xD8,
 0x2E, 0x46, 0x25, 0xC6, 0x13, 0xCB, 0x3B, 0xD4,
 0x3B, 0xA5, 0xFB, 0xE9, 0x3C, 0x1F, 0x54, 0xC9,
 0x1F, 0x30, 0x30, 0x43, 0xC1, 0x50, 0xF9, 0xAD,
 0x7A, 0x8B, 0x5C, 0x8D, 0xFD, 0xD4};

int main(int argc, char* argv[])
{
    unsigned char buffer[662];
    int bytes_read = 0;
    int i;

    _setmode(_fileno(stdin), _O_BINARY);
    _setmode(_fileno(stdout), _O_BINARY);

    do {
        bytes_read = fread(buffer, 1, 662, stdin);
        for (i=0;i<bytes_read;i++)
        {
            buffer[i] ^= key[i];
        }
        fwrite(buffer, 1, bytes_read, stdout);
    } while(bytes_read > 0 || !feof(stdin));

    return 0;
}


One for %a in (*.dat) do datdec.exe < %a > %a.dec later and they're all decrypted. Some visual checking in the hex editor shows that it was successful.

They're not XLS files though. The data is stored in a custom format but the records are fixed size. All text appears to be Unicode and much of it is in Korean.

Name: Anonymous 2007-05-25 15:04 ID:me+NyHor

Oh yeah, also - running Sysinternals' STRINGS utility on the decrypted files gives some interesting snippets:

In UIStringTable: Copyright 2006 Gravity Co., Ltd. & Lee Myoungjin. All Rights Reserved.

In BanNick: Jormungand, Heimdall, Nidhogg, Hrungnir, ... (names from Norse mythology)

So it must be this -- http://www.ragnarokonline.com/

Name: fairX the haxxor ;) 2007-05-25 15:07 ID:Heaven

>>16
This is a serious issue of trust and loyalty to Curse-X.

Name: Anonymous 2007-05-25 15:24 ID:BquB4KQs

>>15
>>16

Anonymous is impressed

Name: Anonymous 2007-05-25 15:31 ID:qG+nhJco

Key is only 331 bytes.

But WTF, xor 'encryption'? I only ever did that when I still used BASIC.

Name: Anonymous 2007-05-25 15:35 ID:me+NyHor

>>19

Haha damn, so it is.

Name: Anonymous 2007-05-25 15:44 ID:Heaven

xor is as secure as anything as long as you use good random data as the key and you DON'T FUCKING USE THE SAME KEY MORE THAN ONCE.

Name: Anonymous 2007-05-25 15:49 ID:Heaven

>>21 is an EXPERT CRYPTOGRAPHER

Name: Anonymous 2007-05-25 15:50 ID:Heaven

>>21
That's what I was referring to, obviously.

Name: Anonymous 2007-05-25 16:29 ID:Heaven

>>19

A couple of years I was surprised to discover that HSBC's business banking software stores its private data in XOR-encrypted DBF files. The key was only 14 bytes long.

Name: Anonymous 2007-05-25 16:34 ID:upVoGZUy

>>21 is actually right, though. The problem with XOR encryption is not strength but the management of keys.

Name: Anonymous 2007-05-25 21:51 ID:Heaven

how 2 lern reed

Name: Anonymous 2007-05-26 14:37 ID:XDtg4F4C

lol

Name: Anonymous 2007-05-26 14:53 ID:3Ml/GJX4

>>25
Yup, if you don't use the key more than once XOR's good. This also means the key must be as long as the file being encrypted.

Name: Anonymous 2007-05-26 22:30 ID:YpQrDKhm

>>28
Not at all. You could use the key to seed a random-number generator.

If you're concerned about being able to crack the generator, you can do a three-way xor with the plaintext, random bits, and repititions of the key.

Name: Anonymous 2007-05-26 22:55 ID:SAbpRyy6

>>29
or just use CBC...

Name: Anonymous 2007-05-27 3:26 ID:J0ZpxbW8

Well of course. You could use tons of pre-existing encryption schemes. I was just describing a quick and dirty way to overcome having xbox hueg keys.

Name: Anonymous 2007-05-27 7:53 ID:Y+MoDcNA

>>29
Key length = length of the key, no matter how you XOR it. It'll never be stronger than its own length.

Name: Anonymous 2007-05-27 8:02 ID:Heaven

>>32
Sure, but the scheme used for these .dat files makes the key a lot weaker than its length.

Name: Anonymous 2007-05-29 16:42 ID:ldJc4EwD

I bet this thread completely confused the OP

Name: Anonymous 2007-07-10 10:28 ID:5RHaFZBu

OP here. I'm completely confused, but I'm also completely facinated.

Bricks have been shat, but please continue

Name: Anonymoose 2007-07-10 11:03 ID:5RHaFZBu

OP here again,
>>15
I'm trying to create an english client for Ragnarok Online 2, which is why I'm trying to get these files into a legible form...

Name: Anonymous 2007-07-10 13:30 ID:S0bHNwnZ

holy shit did /prog/ actually do something useful?

Name: Anonymous 2007-07-10 13:53 ID:A6oFUtMt

>>15
>>16

Holy shit dude, props!

Name: Anonymous 2007-07-10 15:08 ID:kIq8gesU

>>36

Are you just doing an English translation of these data files, or actually creating one from scratch?

Name: Anonymous 2007-07-10 17:15 ID:5RHaFZBu

I simply want to translate all the korean text in the client from korean to english (I'm fluent in both languages) so that english speakers can also play this game. I have done some work translating NPC dialogs so far, but the .dats I don't know how to unpack and then repack (so that they work with the game)

Name: Anonymous 2007-07-10 18:02 ID:IJVCRWs0

>>39
OP is working on an English translation of the files for an RO2 emulator project (which I am also in, on that matter).
Gravity Corp. is genius at security, as past experience has shown - each time it became apparent we got through their encryption, they just replaced the XOR keys on the same files with longer ones.

>>15-16
Nice one

Name: Anonymous 2007-07-11 11:25 ID:qPUv2g0z

>>40

Can you unpack/pack them now that you know how to decrypt them?

Name: Anonymous 2007-07-12 8:47 ID:1B6M9EFy

It disgusts me that the fine tales of Norse mythology have been bastardised into an anime-themed RPG inhabited mainly by children. My Viking ancestors would be rotating in their inflammable longboats if they knew.

Name: Anonymous 2007-07-26 11:24 ID:/Jz6oqMH

>>43
I lol'd

Name: Anonymous 2007-07-26 11:25 ID:Heaven

>>44
I also LOL'd but did not enter into the faggotry it is to bump an old thread.

Name: Anonymous 2007-07-26 15:43 ID:YpQrDKhm

>>45
This is not an old thread.

Name: Anonymous 2007-07-26 16:08 ID:jFlELePY

It's one of the best threads on here, so fuck off all you haters

Name: Anonymous 2007-08-17 13:42 ID:YY/xaR9T

>>15
>>16
God is real

Name: Anonymous 2007-08-17 20:44 ID:Heaven

>>48
I often find that I don't need the extra precision, so I just declare him to be a float to save some space. It may seem insignificant now, but when you're programming a large polytheistic religion, the reduced memory footprint really shows.

Name: Anonymous 2007-10-11 21:46

>>48
;u;

Name: Anonymous 2007-10-12 8:06

Oh, sup Janus Project.

Name: Anonymous 2007-10-12 15:51

[quote]oeueu[/quote]

Name: Anonymous 2007-11-14 6:48

BAMP

Name: Anonymous 2007-11-14 9:42

[quote]oeueu[/quote]
Epic fail.

Name: Anonymous 2007-11-14 18:58

>>51
Oh, sup anus Project.

Name: Anonymous 2007-11-14 22:50

Since im on mac everything is SOOOOOOOOOOO EASY
I just double click to open files!!!!!!

Name: Anonymous 2007-11-15 4:46

Use TRON, with the entity/avatar system.

Name: Anonymous 2007-12-21 4:12

Wow, >>15 is a truly **EXPERT** BBCODE PROGRAMMER

Name: Anonymous 2009-07-26 1:07

lol

Name: Anonymous 2009-07-26 7:37

[spoiler]dont mind me just passin thru[/spolier]

Name: Anonymous 2009-07-26 7:37

dont mind me just passin thru

Name: Anonymous 2010-05-05 18:21

Did OP finally made the translation?

Name: Anonymous 2010-05-05 18:49

>>62
I AM A HIGH-LEVEL NECROMANCER AND I RAISE THIS THREAD FROM THE GRAVE
Yes?

Name: Anonymous 2010-05-05 19:42

>>63
* African-Americanmancer

Name: Anonymous 2010-05-05 21:10

>>64
Negromancer? Is this the pun?

Name: Anonymous 2010-05-05 23:44

>>64
>>65
I laughed

Name: Anonymous 2010-05-06 6:35

>>65
* African Americanmancer

>>66
I did too :(

Name: Anonymous 2010-11-25 23:20

Name: Sgt.Kabu면供kiman欵罝 2012-05-29 2:14

Bringing /prog/ back to its people
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy

Name: Anonymous 2012-11-26 15:57

>>15
Hey XOR-san, can you help us find http://www.gchq.gov.uk/Press/Pages/Pigeon-takes-secret-message-to-the-grave.aspx before reddit does?

Name: Anonymous 2012-11-26 16:04

>>71
He's dead, Jim.

Name: Anonymous 2012-11-26 19:28

Name: Anonymous 2012-11-27 0:06

SERGEANT KABUTERRIMON

Name: Anonymous 2012-11-27 0:07

ELECTRO SHOCKER!!!

Name: Anonymous 2012-11-27 0:32

>>73
That makes no sense. Are you sure you had the right thread in your clipboard?

Name: Anonymous 2012-11-27 5:57

>>1 links are dead

Don't change these.
Name: Email:
Entire Thread Thread List