[Python] NDT files decryptor

10/12/2011 22:50 neuronet#16
You don't need to reverse it back to NDT Format.. just rename the txt to ndt and it will work
10/13/2011 02:18 Diuuude#17
You are talking about server-sided ndt files, aren't you ?
10/13/2011 16:20 ArgosManiac#18
can u pls tell me what's this "NDT files decryptor" actually do? ty^^
10/13/2011 16:56 kevy21#19
Decrypts .NDT Files
12/02/2011 19:07 seinnt#20
how about change rewards per quest?
was that possible?
12/02/2011 22:11 kevy21#21
Quote:
Originally Posted by seinnt View Post
how about change rewards per quest?
was that possible?
no because,

1/ they are checked against server side files

2/ you would need it recompiling
12/03/2011 00:58 neuronet#22
Quote:
Originally Posted by seinnt View Post
how about change rewards per quest?
was that possible?
if you change your files it wil only "show" you different.. The Reward finally given is server-side
12/03/2011 04:05 inter55545#23
@ bootdisk
big THX
Is work Perfectly Thanks for Share Many info are now too read

I hope the next step anyone will be share the server files ^^
03/14/2012 14:51 dalicia#24
Quote:
Originally Posted by neuronet View Post
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...
Did someone find a solution to this problem?
Even some image files are crypted now for KAO... :mad:
06/24/2012 14:04 neuronet#25
Hmm... I ported the NDT file decrypt tool to AutoIT for better usage for my own stuff... but still only working with "old 1.1" format.. the new format that's meanwhile used from USAO and KORAO i still have not found the "solution" to decrypt... :(

Code:
#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.3.8.1
 Author:         NeuroNet (based on BootDisk)

 Script Function:
	NDT/NTX-Decryptor

#ce ----------------------------------------------------------------------------


$file_in = FileOpenDialog("Select ndt/ntx-file", @ScriptDir, "All (*.*)")
$file_ou = StringTrimRight($file_in, 4) & ".txt"

$in_file = FileOpen($file_in, 0)
$ou_file = FileOpen($file_ou, BitOR(16, 2))

If $in_file = -1 Then
    MsgBox(0, "Error", "Unable to open file.")
    Exit
EndIf

FileSetPos($in_file, 12, 0)

$seed = Asc(FileRead($in_file, 1))

$size = FileGetSize($file_in)

For $i = 26 To ($size-1)
	FileSetPos($in_file, $i, 0)
	$v = Asc(FileRead($in_file, 1))
	$v = $v - $seed
	$v = BitAND ($v, 0xFF)
	$v2 = Asc(FileRead($in_file, 1))
	$v = BitXOR ($v, $v2)
	FileWrite($ou_file, Chr($v))
Next

FileClose($in_file)
FileClose($ou_file)
For the "new" file format i wrote first a "reverse" script to see what's happening:

Code:
#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.3.8.1
 Author:         NeuroNet (based on BootDisk)

 Script Function:
	Decrypt-Seed-Tester

#ce ----------------------------------------------------------------------------

; clear result:"V     e     r     s     i     o     n     I     n     f     o    "
$test_result = "56 00 65 00 72 00 73 00 69 00 6F 00 6E 00 49 00 6E 00 66 00 6F 00"

; first "crypted" bytes of old 1.1 files....
$test_input  = "5C 5C 0A DD 8B 4B F9 D4 82 59 07 DA 88 58 06 FD AB 37 E5 F5 A3 3E EC 93"

; first "crypted" bytes of new 1.3 files....
;~ $test_input  = "1B 00 0D F9 5D 00 B0 00 20 00 25 CC BF 57 74 00 21 00 DC CB DB 57 5A CD"

$test_input_split = StringSplit($test_input, " ")
$test_result_split = StringSplit($test_result, " ")

$test_seed = ""

For $i = 1 To $test_result_split[0]
	for $x = 0x0 to 0xFF
		$v = Dec($test_input_split[$i])
		$v = $v - $x
		$v = BitAND ($v, 0xFF)
		$v2 = Dec($test_input_split[$i+1])
		$v = BitXOR ($v, $v2)
		if Dec($test_result_split[$i]) = $v Then
			$test_seed = $test_seed & Hex($x, 2) & " "
			ExitLoop
		EndIf
	Next
Next

$Res_text = $test_input & @CRLF & $test_result & @CRLF & $test_seed
MsgBox(4096, "Test", $Res_text)
if i run it with the "old" pattern (1.1 : "5C 5C 0A DD 8B 4B F9 D4 82 59 07 DA 88 58 06 FD AB 37 E5 F5 A3 3E EC 93") it shows in msgbox in last line the same "seed" for all bytes:

[Only registered and activated users can see links. Click Here To Register...]

if i run it with the "new" pattern (1.3: "1B 00 0D F9 5D 00 B0 00 20 00 25 CC BF 57 74 00 21 00 DC CB DB 57 5A CD") it shows different seeds so i think they maybe use new crypt algorithm... :(

[Only registered and activated users can see links. Click Here To Register...]

any1 any useful/helpful idea?
06/24/2012 15:22 inter55545#26
neuronet send me plz the serverip.ndt form Kor version
so i will look whats happend
06/24/2012 22:31 neuronet#27
Quote:
Originally Posted by inter55545 View Post
neuronet send me plz the serverip.ndt form Kor version
so i will look whats happend
it's versioninfo not serverip but same format....
06/27/2012 17:29 inter55545#28
komm da jetzt auch net weiter
06/29/2012 03:15 neuronet#29
Finally...

Here is a version of decryptor that can also decrypt the new ndt files...

it is command line tool...

Code:
USAGE: NDT_CONVERT sample.ndt
decryption result will be saved then as

sample.ndt.txt

have fun...

it will recognice whether it's 1.1 or 1.3 crypted...

Download moved with update to next post...
06/29/2012 11:18 neuronet#30
Changed....

Will recognize version autmatically...

so u can use it for both.. old and new ".ndt" ".ntx" files