Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Tool]Simple resource converter

(oO (||||) (||||) Oo)
Loyal Member
Joined
Aug 6, 2009
Messages
2,132
Reaction score
429
Simple tool for converting files from .bin to .txt and .txt to .bin
I used AES, AESFile, and MHFile from lunba source.
I might clean up the code a littlebit and upload the source. Maybe I won't, can't promise.

Following keys are included
Code:
20040308    ""
20090506    "E76B2413958B00E193A1"
20101117    "A15H3825287T19G082K8"

Why?

  • I prefer editing resource files in notepad++ instead of provided tool.
  • Easier to encrypt all files with latest key
  • convenience of not having to open original gui


How to

  • Select files (.bin or .txt) and drop them onto LunaBinConvert.exe file. All .txt will be converted to .bin and .bin will be converted to .txt
  • You can convert multiple files at once.
  • Text files will be encrypted with latest available key. Make sure you client/server supports latest key provided above.

Download

  • 06/23/2013
    • Fixed issue where only ~100 could be converted. Turns out there are issues when your application uses 2GB of ram. Also I forgot to get rid of MhFileExt pointer resulting in memory leaks...
  • 06/22/2013
    • First release
 
Last edited:
I play it straight up, yo
Joined
May 19, 2012
Messages
931
Reaction score
121
Might want to point out that it'll crash around 100+ files, 50-75 or less seems to work well, but in the cmd window it doesn't display the last few bins being converted.
 
Last edited:
(oO (||||) (||||) Oo)
Loyal Member
Joined
Aug 6, 2009
Messages
2,132
Reaction score
429
Uploaded a new version. Developers were lazy and by default allocated MEGA memory for each file, which is around 20megabytes (~100 files is ~2GB). Also I forgot to delete MHFileExt pointer which could have probably solved the problem.
 
(oO (||||) (||||) Oo)
Loyal Member
Joined
Aug 6, 2009
Messages
2,132
Reaction score
429
It's possible you release/share your source?
Thanks, good Tool!

Copy AESFile.h/cpp, AES folder from [CC]Header. Copy MHFileEx from filepack project.
Create a new project. Loop through list of argumets. If argument file ends with .bin then call OpenBinFile on MHFileEx then call save SaveAsText. Similar procedure for text to bin. Also in MHFileEx change MEGA to actual data size that is read from file header if it's a bin or file size if text file is being open.

That's the whole source for you. If you want something specific I can probably do it if I get some spare time.
 
(oO (||||) (||||) Oo)
Loyal Member
Joined
Aug 6, 2009
Messages
2,132
Reaction score
429
If you don't mind me posting the source after I do all that, then I'll go ahead and do it, something better to do with my time.

Sure. Maybe someone will be kind enough to pick this little project and make it better. For example loading keys from a text/config file. Spreading the task across multiple threads, which might be good for slower dualcore cpus.
 
Joined
Jan 22, 2009
Messages
1,121
Reaction score
424
Sure. Maybe someone will be kind enough to pick this little project and make it better. For example loading keys from a text/config file. Spreading the task across multiple threads, which might be good for slower dualcore cpus.

Possible you change your project to Form (like PackingTool/Extract) ?
 
(oO (||||) (||||) Oo)
Loyal Member
Joined
Aug 6, 2009
Messages
2,132
Reaction score
429
Possible you change your project to Form (like PackingTool/Extract) ?

Well the original tool provides a form. In notepad++ you can setup an action to be executed after you save the file. Let's say you edit text file, make changes, save, and then notepad++ executes an action to pack the file and copy it to client folder. You can also setup language templates so that quests scripts and such can be formatted/styled. In notepad++ you can search and replace with ease. With compare plugin you can compare two resource files easier as well. Hell you can even setup Excel script to load table data (items, skills, pets) and again setup an action to save, encrypt, and copy to client folder.

Just giving some ideas how this can be better if you have an efficient setup/workplace.

I mentioned notepad++ but you can use any text editor.
 
Joined
Jan 22, 2009
Messages
1,121
Reaction score
424
How you encrypt/descrypt with notepad++? (Not sure I understand correctly, I'm use Google Translate.

But man, what is problem to you release your source? ;P
 
Last edited:
I play it straight up, yo
Joined
May 19, 2012
Messages
931
Reaction score
121
How you encrypt/descrypt with notepad++? (Not sure I understand correctly, I'm use Google Translate.

But man, what is problem to you release your source? ;P

Notepad++ doesn't do the encryption or decryption :) you use LunaBinConverter.exe to convert it to a .txt file, then he uses notepad++ to edit them, then he uses the converter to convert it back to a .bin file. Hope this helps!
 
(oO (||||) (||||) Oo)
Loyal Member
Joined
Aug 6, 2009
Messages
2,132
Reaction score
429
But, with plugin it's possible. Luna use encrypt AES

You just edit the text file in notepad++. You do not decrypt or encrypt with notepad++.
If you can setup a macro/action you can make it seem like notepad++ encrypts and decrypts .bin files.
In reality it will use LunaBinConverter to do the actual encryption and decryption.
 
Newbie Spellweaver
Joined
Mar 3, 2013
Messages
55
Reaction score
3
thanks.. btw.. this help me decrypt cocoloa luna, when i use they resource, my client cant run and crash without a notice, then i search them at they client, aes key of cocoloa luna and same like here, lastest AES key , i open with lastest AES key packingtool, no errors, but cant open the files and just give a text " ÿþ/ " , then i use this,.. and.. its work.. the txt version is in UNICODE, as it japan txt... maybe all source code here only can read ANSI only? it im newbie about computer thingty., sorry about this and sorry my bad english
 
Last edited:
Newbie Spellweaver
Joined
Aug 9, 2011
Messages
52
Reaction score
3
sorry I can download but I'm can't running your file that error win32
 
Newbie Spellweaver
Joined
May 31, 2018
Messages
16
Reaction score
0
Is it possible to add like 1 or 2 more AES Keys into this ?
 
Back
Top