(08-01-2012, 10:45 AM)Kevin Wrote: 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!!
1. Yes. The first 123 bytes aren't used.
2. It just reads one byte from the file.
3. It calls the DecryptByte method, if you scroll down you'll see it.
Code:
public static byte DecryptByte(int counta,byte b){
String plainEncryptionKey = "odBearBecauseHeIsVeryGoodSiuHungIsAGo";
b -= (byte)plainEncryptionKey.charAt(counta);
return b;
}"counta" (which is a retarded name for a variable) is the place we are currently at in the key. It goes from 0 to 35(as soon as we reach the end of the key, we go back to the start). b is the byte we read from the file. We take the value we read from the file and subtract the value of the key.
4. Yes, it is the result of DecryptByte. DecryptByte IS the encoding method.
What language are you trying to do it in? I can help you if it's something C-ish (C/PHP/Java/C#/Go) or Python.
![[Image: doty7Xn.gif]](http://i.imgur.com/doty7Xn.gif)
10 ʏᴇᴀʀs sɪɴᴄᴇ ɪʀᴄ ɢᴏᴏᴅ.ɪ ᴡᴀʟᴋ ᴛʜʀᴏᴜɢʜ ᴛʜᴇ ᴇᴍᴘᴛʏ sᴛʀᴇᴇᴛs ᴛʀʏɪɴɢ ᴛᴏ ᴛʜɪɴᴋ ᴏғ sᴏᴍᴇᴛʜɪɴɢ ᴇʟsᴇ ʙᴜᴛ ᴍʏ ᴘᴀᴛʜ ᴀʟᴡᴀʏs ʟᴇᴀᴅs ᴛᴏ ᴛʜᴇ ɪʀᴄ. ɪ sᴛᴀʀᴇ ᴀᴛ ᴛʜᴇ sᴄʀᴇᴇɴ ғᴏʀ ʜᴏᴜʀs ᴀɴᴅ ᴛʀʏ ᴛᴏ sᴜᴍᴍᴏɴ ᴛʜᴇ ɢᴏᴏᴅ ɪʀᴄ. ɪ ᴡᴀᴛᴄʜ ᴏᴛʜᴇʀ ɪʀᴄ ᴄʜᴀɴɴᴇʟs ʙᴜᴛ ɪᴛ ɪs ɴᴏ ɢᴏᴏᴅ. ɪ ᴘᴇsᴛᴇʀ ᴢᴏʀᴛ ᴀɴᴅ ᴛʀʏ ᴛᴏ ʀᴇsɪsᴛ ʜɪs sᴇxɪɴᴇss ʙᴜᴛ ɪᴛ ɪs ᴀʟʟ ᴍᴇᴀɴɪɴɢʟᴇss. ᴛʜᴇ ᴇɴᴅ ɪs ɴᴇᴀʀ.ɪ ᴛʜᴇɴ ᴜsᴜᴀʟʟʏ ʀᴇᴀᴅ sᴏᴍᴇ ᴏʟᴅ ɪʀᴄ ʟᴏɢs ᴀɴᴅ ᴄʀʏ ᴍʏsᴇʟғ ᴛᴏ sʟᴇᴇᴘ.

Chat



!!