DCing algorithm - Printable Version +- Little Fighter Empire - Forums (https://lf-empire.de/forum) +-- Forum: Little Fighter 2 Zone (https://lf-empire.de/forum/forumdisplay.php?fid=7) +--- Forum: Projects (https://lf-empire.de/forum/forumdisplay.php?fid=10) +---- Forum: Releases (https://lf-empire.de/forum/forumdisplay.php?fid=34) +---- Thread: DCing algorithm (/showthread.php?tid=1877) |
DCing algorithm - Silverthorn - 01-14-2009 After Silva explained how the encryption of dat-files works (big thanks for that again), I tried to implement that into a programming language. As the only language I'm better at is Java, this code is written in Java (duh!). Feel free to copy the code, or try to understand it. I seldomly write comments, and if I do, they're pretty useless :P What it does: it reads the file template.dat (which has to be in the same folder as the class-object), decrypts it, and outputs the decrypted result into a txt-file. On a side note: if you copy this code, I'd be pleased as punch if you leave the author notes in there. If you remove them, I'll stalk you until I chopped off your head after I cut out your heart, pulled out every single nail, sliced up your stomach and the usual stuff Code: /* RE: DCing algorithm - Boop - 01-14-2009 Code: /*Programmed by Silva My version (works faster because it uses streams ). RE: DCing algorithm - Silverthorn - 01-14-2009 k, take Silva's version, it's working faster. For a reason that I don't know RE: DCing algorithm - Azriel - 01-15-2009 mine's better coz it reads and writes. not released yet coz I haven't finished it (doesn't update UI and what not). (no - colour coding is not as simple as it looks) Azriel~ RE: DCing algorithm - Boop - 01-15-2009 We are talking about the algorithm >.<" . Not about the application, lol. RE: DCing algorithm - 1477 - 01-15-2009 Ok, I don't know if I should be posting here (because the only people who have posted are elite members ) but do the decoding algorithms work on R-LF2 data files? Jiquera's DC doesn't work, and Rammichael's DC works, but the only difference between regular and RLF2's data files are the special chinese characters in the name (I think everyone knows this already). My question is, why does Rammichael's DC works and Jiquera's doesn't (after all, they're just characters in the name), and does BP and Silva's algorithm work for R-LF2 data files ? RE: DCing algorithm - Boop - 01-15-2009 Jiquera's data changer is just uses poorly coded libraries to read in data(my theory), it stops when it reaches a certain byte value. This doesn't happen with our implementations I believe. RE: DCing algorithm - Silverthorn - 01-16-2009 I don't have any r-lf2-files on my comp right now, so I cannot test the decrypter with them. However, I just tried the "stupid" unreadable-making-method, where you just replace the first few bits. It works fine, and I think this is the encryption method of r-lf2. (Of course it works, I know how me and Silva coded :P) But just to prevent any questions, CE-LF2 dat-files are encrypted in a different way, and with this code you cannot decrypt them either. RE: DCing algorithm - Yakui - 01-18-2009 (01-16-2009, 03:06 PM)Blue Phoenix Wrote: I don't have any r-lf2-files on my comp right now, so I cannot test the decrypter with them. However, I just tried the "stupid" unreadable-making-method, where you just replace the first few bits. It works fine, and I think this is the encryption method of r-lf2. (Of course it works, I know how me and Silva coded :P) I love bringing this up, but if you press A + B + C in LF2 mid-game you get to a sort of debug mode. F2 crashes the game, but F3 calls up an encrypter/decrypter for .dat files. I don't have an R-LF2 data file at hand, but there's a chance it was done using that or celebix' encrypter/decrypter, which does exactly the same. Kinda what I suspect CL of having done, really, however I'm not sure how relevant this is. RE: DCing algorithm - Kevin - 08-01-2012 DAMN YOU ALL genius people or more like DAMN YOU java (for me it's a 'language from planet') I've been trying many things but none of them works Please try to make this noob understand how to encode/decode dat files. I'd like to start from how to convert the encoded version into a readable version. I'm learning from Silva's code, but also read BP's to help me understand. but.... 1. Count to 123 first - does that mean the first 123 characters are unused? Or... I don't have any idea, probably this is what makes me fail coz I don't even have any idea what else to try about this 2. b=(byte)finp.read(); --> I can't find this on my dictionary. What does this mean in this planet's language? 3. d = DecryptByte(counta,b); ---> does DecryptByte give you the KeyAscii (keycode or sth) from the character? But if so, I don't understand why there must be the variable 'b' behind it. 4. System.out.print((char)d); ---> does this prints the character stored in variable 'd' ? which is the result of DecryptByte(counta,b) ? But that's strange, I can't see where you modify / encode the byte :0 . And damn you gravedigging warning . And damn me . and thanks for replying and helping !! EDIT: Finally . Chiko explained all to me. So the first 123 chars are useless. We subtract the 'KeyAscii' of the 124th character with the 'KeyAscii' of the 1st char of the encryption key. then the 125th character with the 2nd char from the key, so on. When we get to the end of the encryption key, go back to the first character. Oooooooo....... not it works, I have to open another thread |