• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

[Help][dev] How does Habbo packet base64 encoding/decoding works?

Newbie Spellweaver
Joined
Jun 29, 2009
Messages
88
Reaction score
3
I've been reading the following posts:
-
-

But im unable to understand, im confused with the base64 part.

For example, on Nillus post he says that "B@" corresponds to the int 128, but when I try to enconde 128 in I get totally unrelated result "MTI4"

I even asked chat-gpt but has no clue. I'm not sure if it really is Base64 encoding as I never seen '@' in base64 encoded string!

Would appreciate any help, im looking more explanations that help me to understand, not looking for code.
 
Newbie Spellweaver
Joined
Jun 29, 2009
Messages
88
Reaction score
3
Use this
Yeah, I managed to code my own B64 encoder/decoder after alot of confusion... Its not the base64 binary-to-text encoding, its more that the numbers base is 64, just like base2 is binary means only numbers from 0-1, base64 or radix 64 is meant to go from 0-64 only. Has nothing to do with actual "base64 encoding"
 
Upvote 0
Newbie Spellweaver
Joined
Jun 29, 2009
Messages
88
Reaction score
3

That code is broken, function decode_vl64 is not working on line 27, specifically:
value[i + 1] should be value[ i ]

As said, managed to make my own functions. Just impressive, the functions are not documented, and no one ever asked anything about them. I guess everyone just copies and pastes or translates them into other language. There is a "guide" by Nillus that really doesnt explain anything about how the functions work.

At this point im just reverse engineering the LingoScript from the DCRs
 
Upvote 0
Back
Top