[Python] NDT files decryptor

09/12/2010 23:34 bootdisk#1
Hi,

I was a player of Silkroad Online but since I've quit I've been playing/trying other mmos til I found Altlantica Online.

I saw one post (maybe done in ancient times) that someone wanted to decrypt ndt files and so I did my try.

Perhaps you all have one already but anyway, I was willing to share.
It's made in Python and I did it in one day.

Code:
from Tkinter import *
from tkFileDialog   import askopenfilename 
import struct

filename = askopenfilename()

if len(filename) == 0:
    exit()

outputfilename = filename[:-4] + '.txt'

f = open(filename, 'rb')
buf = f.read()
f.close()

HEADER_SIZE = 0x18

seed = struct.unpack('<H', buf[12:14])[0]

output = []

for i in xrange(HEADER_SIZE, len(buf)-1):
    v = struct.unpack('<B', buf[i])[0]
    v -= seed
    v = v & 0xFF
    b2 = struct.unpack('<B', buf[i+1])[0]
    x = v ^ b2
    output.append(x)

f = open(outputfilename, 'wb')
for v in output:
    f.write(struct.pack('B', v)[0])
f.close()
exit()
To run it you just need Python 2.x version ([Only registered and activated users can see links. Click Here To Register...]).
Anyway, I think the code it's not so complicated to follow.

Note: this script, will EAT the last byte of the file, hehe... but it's nice for a first release.
Note2: if you think this is useful I could work on it further.
09/13/2010 03:59 superman49#2
how do i make this run
sorry for nooby qiestion i am not so good with programming


and it possible u can edit monster drop rate or valcunus enchancing rate
09/13/2010 05:18 bootdisk#3
there you have a zip file... scans are not needed since it contains only a .py (Python file) which is basically a text file.

extract it and you will find a convertndt.py file.

[Only registered and activated users can see links. Click Here To Register...]
(try to download any 2.6 or 2.7 version).

then you just need to do a double click on the convertndt.py file.

and no, you can't modify those things because those are server side.
this tool is more oriented for programmers of this mmo to develop new stuff.
09/14/2010 01:49 superman49#4
ok thanks
:)
12/04/2010 19:18 Diuuude#5
Sorry for bumping this old thread but is it possible that you release the same tool for converting txt files to NDT ?
12/05/2010 09:33 anamapiro12#6
what makes it work??

srry I know this not at all ^ ^
07/06/2011 11:28 neuronet#7
Hi!

Since I'm not that cood in coding python and the packer stuff, maybe you can help also other direction?

Means getting the encrypted NDT file back to nDoors/Nexon NDT file format?

Thanks a lot...
07/06/2011 14:28 bootdisk#8
Sorry I lost my account of AO (I was playing it through ijji), that's why I left it. xD
But I'll rewrite it in C++ and I'll try to make it encode too. Perhaps by the end of the week I'll have something. :)
It's nice to know that it was helpful for your developments.
07/06/2011 19:08 neuronet#9
Yes, it helped me really a lot. Thanks again men...

Btw.. Migration from old ijiji Accounts is poossible again.. :D
07/07/2011 01:40 Vulcanraven#10
Well...
thats rly nice :) thanks


Quote:
Originally Posted by neuronet View Post
Hi!

Since I'm not that cood in coding python and the packer stuff, maybe you can help also other direction?

Means getting the encrypted NDT file back to nDoors/Nexon NDT file format?

Thanks a lot...

Just rename the .txt file to .ndt this works fine.
07/09/2011 01:32 neuronet#11
Thanks...
I totaly forgot about the just renaming thing...
07/10/2011 16:21 chipking1#12
Hey what does this do anyway I'm not good with computers at all just download and play lol
08/19/2011 11:55 Impulse89#13
Nice start, but in C++ / C sharp, will be better =)
P.S.
You may use py2exe, or cx_freeze to making windows executable. ;)
10/10/2011 13:02 neuronet#14
I have now a problem...

For IntAO and EuroAO the converter works.. but not for KAO...

Any idea how to solve this problem? I have attached an .ndt file from Korean AO...

Thanks a lot in advance...
10/12/2011 22:07 Diuuude#15
Any way to reverse this function and crypt files back to original NDT format ?