Habbo Packet Explaining

Results 1 to 21 of 21
  1. #1
    Proficient Member Squard is offline
    MemberRank
    Dec 2011 Join Date
    155Posts

    Habbo Packet Explaining


    I will explain the new habbo packet handling

    What's the difference?
    - No base encoding anymore. They using Bits.

    How to handle an Integer?
    Get 4 Numbers (as bits).

    Bits explaining
    Code:
    Example:
    1-0-0-0 = 1 as int
    0-1-0-0 = 256 as int
    1-1-0-0 = 257 as int (1x 256 + 1)
    1-2-0-0 = 513 as int (2x 256 + 1)
    
    You have to count further.
    
    Like having 4 Row(s) in an byte array.
    Every row has an max of 255 (bit).
    1-2-3-4 Rows.
    If the row has reaches his max then the next row gets + 1.
    Thent he old row will be set to 0, to count again.
    Every single item stands for an integer of an max of (255).

    Int lengths
    Int32 = 4 (bits)
    Int16(short) = 2 (bits) [Used for HeaderId and string lengths]

    Something weird
    Habbo reversed the bytes sometimes.

    Boolean explaining
    They just used a single bit for the boolean.

    Code:
    Example
    True = 1
    False = 0
    String explaining
    Not that hard, they just used as first.
    [String Length (as short)] + Text of string.

    Characters explaining
    Just use your bitconverter to do this.

    With all pleasure :)

    Like if you know more after reading this!

    New ServerMessage

    Code:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    
    namespace HabboTCP.Messages.Library
    {
        class ServerMessage
        {
            private List<byte> Context = new List<byte>();
    
            public ServerMessage(short HeaderId) { Append(HeaderId); }
    
            public void Append(object Item)
            {
                if (Item is Int32 || Item is int)
                {
                    AddInt32((Int32)Item);
                }
                else if (Item is Int16 || Item is short)
                {
                    AddInt16((Int16)Item);
                }
                else if (Item is Boolean || Item is bool)
                {
                    AddBoolean((Boolean)Item);
                }
                else if (Item is String || Item is string)
                {
                    AddString(Item as string);
                }
            }
    
            private void AddInt32(Int32 Item)
            {
                AddBytes(BitConverter.GetBytes(Item), ReverseType.Reversed);
            }
    
            private void AddInt16(Int16 Item)
            {
                AddBytes(BitConverter.GetBytes(Item), ReverseType.Reversed);
            }
    
            private void AddBoolean(Boolean Item)
            {
                AddBytes(new byte[] { (byte)(Item ? 1 : 0) }, ReverseType.Fresh);
            }
    
            private void AddString(String Item)
            {
                AddInt16((short)Item.Length);
                AddBytes(Encoding.ASCII.GetBytes(Item), ReverseType.Fresh);
            }
    
            private void AddBytes(byte[] Bytes, ReverseType Type)
            {
                if (Type == ReverseType.Reversed)
                {
                    for (int i = (Bytes.Length - 1); i > -1; i--)
                    {
                        Context.Add(Bytes[i]);
                    }
                }
                else
                {
                    Context.AddRange(Bytes);
                }
            }
    
            public byte[] Bytes()
            {
                var Result = new List<byte>();
    
                Result.AddRange(BitConverter.GetBytes(Context.Count));
    
                Result.Reverse();
    
                Result.AddRange(Context);
    
                return Result.ToArray();
            }
        }
    
        enum ReverseType
        {
            Fresh,
            Reversed
        }
    }
    Last edited by Squard; 16-12-11 at 06:05 PM.


  2. #2
    Account Upgraded | Title Enabled! George2000 is offline
    MemberRank
    Jul 2011 Join Date
    The NetherlandsLocation
    1,150Posts

    Re: Habbo Packet Explaining

    What the fuck? You didn't really explained this:

    1-0-0-0 = 1 as int
    0-1-0-0 = 256 as int
    1-1-0-0 = 257 as int (1x 256 + 1)
    1-2-0-0 = 513 as int (2x 256 + 1)

    But I think this is good.. I can understand it myself. But maybe you could explain why it's that way.

    Not really something usefull in my opinion. But you deserve a like for making guide.

  3. #3
    Alpha Member Zak© is offline
    MemberRank
    Oct 2007 Join Date
    2,693Posts

    Re: Habbo Packet Explaining

    Quote Originally Posted by George2000 View Post
    What the fuck? You didn't really explained this:

    1-0-0-0 = 1 as int
    0-1-0-0 = 256 as int
    1-1-0-0 = 257 as int (1x 256 + 1)
    1-2-0-0 = 513 as int (2x 256 + 1)

    But I think this is good.. I can understand it myself. But maybe you could explain why it's that way.

    Not really something usefull in my opinion. But you deserve a like for making guide.

    Not fully but enough for me to understand it?

    Mayb it's just you...

  4. #4
    C# | C++ Emerica is offline
    MemberRank
    Oct 2010 Join Date
    GermanyLocation
    437Posts

    Re: Habbo Packet Explaining

    Quote Originally Posted by George2000 View Post
    What the fuck? You didn't really explained this:

    1-0-0-0 = 1 as int
    0-1-0-0 = 256 as int
    1-1-0-0 = 257 as int (1x 256 + 1)
    1-2-0-0 = 513 as int (2x 256 + 1)

    But I think this is good.. I can understand it myself. But maybe you could explain why it's that way.

    Not really something usefull in my opinion. But you deserve a like for making guide.
    It's ok..
    He wrote it into the clamps

    String explaining
    Not that hard, they just used as first.
    [String Length (as short)] + Text of string.
    e.g I got this:
    Code:
    [0][0][0]%[2]»[0] f4ca7d0937c6421ee36b2406ead092df[0]
    Than I have to write this ??:
    Code:
    Message.Append(38 + "f4ca7d0937c6421ee36b2406ead092df");
    Cause, I got 38 as String Length
    Last edited by Emerica; 16-12-11 at 07:11 PM.

  5. #5
    Account Upgraded | Title Enabled! George2000 is offline
    MemberRank
    Jul 2011 Join Date
    The NetherlandsLocation
    1,150Posts

    Re: Habbo Packet Explaining

    Quote Originally Posted by Zak© View Post
    Not fully but enough for me to understand it?

    Mayb it's just you...
    Can't you read:

    I can understand it myself

    It's not I can't understand, but noobs can't.

  6. #6
    Live Ocottish Sverlord Joopie is offline
    LegendRank
    Jun 2010 Join Date
    The NetherlandsLocation
    2,773Posts

    Re: Habbo Packet Explaining

    Quote Originally Posted by George2000 View Post
    Can't you read:

    I can understand it myself

    It's not I can't understand, but noobs can't.
    I understand it and I'm noob at this shit

  7. #7
    Account Upgraded | Title Enabled! George2000 is offline
    MemberRank
    Jul 2011 Join Date
    The NetherlandsLocation
    1,150Posts

    Re: Habbo Packet Explaining

    Quote Originally Posted by joopie View Post
    I understand it and I'm noob at this shit
    You're not a noob, but I mean guys who are new to the retro world and guys who don't learn fast.

  8. #8
    Live Ocottish Sverlord Joopie is offline
    LegendRank
    Jun 2010 Join Date
    The NetherlandsLocation
    2,773Posts

    Re: Habbo Packet Explaining

    Quote Originally Posted by George2000 View Post
    You're not a noob, but I mean guys who are new to the retro world and guys who don't learn fast.
    I mean with servers/emulators and encryptions/bits etc...

    Did you ever see me releasing a emulator or a edit of it?

  9. #9
    Account Upgraded | Title Enabled! George2000 is offline
    MemberRank
    Jul 2011 Join Date
    The NetherlandsLocation
    1,150Posts

    Re: Habbo Packet Explaining

    Quote Originally Posted by joopie View Post
    I mean with servers/emulators and encryptions/bits etc...

    Did you ever see me releasing a emulator or a edit of it?
    I'm just trying to be nicer, don't blame me

  10. #10
    Alpha Member Zak© is offline
    MemberRank
    Oct 2007 Join Date
    2,693Posts

    Re: Habbo Packet Explaining

    Quote Originally Posted by George2000 View Post
    I'm just trying to be nicer, don't blame me
    Are you dumb?

    How more easier can you make it!?!?

    If noobs can't understand this, then they gotta learn more about bits? Yes? No?

    K cool.

    And yez i will learn to read.

    Once you learn to code.

  11. #11
    Proficient Member Squard is offline
    MemberRank
    Dec 2011 Join Date
    155Posts

    Re: Habbo Packet Explaining

    Quote Originally Posted by Emerica View Post
    It's ok..
    He wrote it into the clamps



    e.g I got this:
    Code:
    [0][0][0]%[2]»[0] f4ca7d0937c6421ee36b2406ead092df[0]
    Than I have to write this ??:
    Code:
    Message.Append(38 + "f4ca7d0937c6421ee36b2406ead092df");
    Cause, I got 38 as String Length
    No just the string, it will add the Length Automaticly.

  12. #12
    Account Upgraded | Title Enabled! RoyZ is offline
    MemberRank
    Jul 2011 Join Date
    BelgiumLocation
    316Posts

    Re: Habbo Packet Explaining

    He's to smart for us

  13. #13
    Banned Divide is offline
    BannedRank
    Aug 2011 Join Date
    British CoderLocation
    1,013Posts
    O.o Got a java code for this? (Coding a javaEmu)
    Also, Ive got no clue in packets (im a noob at this)

    Sent from my mobile via Tapatalk.

  14. #14
    Account Upgraded | Title Enabled! American is offline
    MemberRank
    Sep 2011 Join Date
    WeedlandLocation
    658Posts

    Re: Habbo Packet Explaining

    Quote Originally Posted by George2000 View Post
    You're not a noob, but I mean guys who are new to the retro world and guys who don't learn fast.
    Mhn.. "new to the retro world" doesn't mean he/she's noob... It is beginners guys..
    like you was the first time with Habbo's.

  15. #15
    Gamma Spamma Liam is offline
    MemberRank
    Dec 2011 Join Date
    Down UnderLocation
    2,945Posts

    Re: Habbo Packet Explaining

    I'm not new to the retro world, but I don't understand this, maybe you could explain a bit easier, sorry, just saying, because I really would like to learn this! And has anyone got a Packet Logger?

  16. #16
    Ask me about Daoism FullmetalPride is offline
    MemberRank
    Nov 2010 Join Date
    2,172Posts

    Re: Habbo Packet Explaining

    Ohhhh so that's how this shit works...O_O so basically every time a packet is sent it's double encrypted with a bit then sent to the Matrix, decoded, decompiled, recompiled and then it gets multiplied by two, sent with PHP code, that's encrypted, then it gets shipped in a box in Cyber Space, sent to the java server once again, sprinkled over a pixel pizza, added to a Habbo's Face, then gets compiled on our end.


    I think I nailed it.


    lol I have no idea what nillus or OP is talking about.

  17. #17
    Account Upgraded | Title Enabled! George2000 is offline
    MemberRank
    Jul 2011 Join Date
    The NetherlandsLocation
    1,150Posts

    Re: Habbo Packet Explaining

    Quote Originally Posted by MyKi View Post
    I'm not new to the retro world, but I don't understand this, maybe you could explain a bit easier, sorry, just saying, because I really would like to learn this! And has anyone got a Packet Logger?
    Search on google:

    Habbo R63 LittleJ Varoke Packetlogger

    Or something similar to that, it's a good packetlogger.

  18. #18
    Banned Divide is offline
    BannedRank
    Aug 2011 Join Date
    British CoderLocation
    1,013Posts

    Re: Habbo Packet Explaining

    Ok, Im stupid. Tell me what this packet is
    "CNH"
    and this one
    "F_@TST-SSO_TICKETHERE[W}"

    Quote Originally Posted by Emerica View Post
    It's ok..
    He wrote it into the clamps



    e.g I got this:
    Code:
    [0][0][0]%[2]»[0] f4ca7d0937c6421ee36b2406ead092df[0]
    Than I have to write this ??:
    Code:
    Message.Append(38 + "f4ca7d0937c6421ee36b2406ead092df");
    Cause, I got 38 as String Length
    No, I think you would need to write..
    Message.Append(char(0).char(0).char(0).char(37).char(2)."»".char(0)."f4ca7d0937c6421ee36b2406ead092df".char(0));

  19. #19
    Apprentice N00b Winger is offline
    MemberRank
    Dec 2011 Join Date
    24Posts

    Re: Habbo Packet Explaining

    Quote Originally Posted by Divide View Post
    No, I think you would need to write..

    Message.Append(char(0).char(0).char(0).char(37).char(2)."»".char(0)."f4ca7d0937c6421ee36b2406ead092df".char(0));
    Not in C#, that's VB/Java or something..

  20. #20
    Member Jake7383 is offline
    MemberRank
    Dec 2011 Join Date
    KentuckyLocation
    57Posts

    Re: Habbo Packet Explaining

    You could explain a bit more I think!

  21. #21
    Account Upgraded | Title Enabled! RoyZ is offline
    MemberRank
    Jul 2011 Join Date
    BelgiumLocation
    316Posts

    Re: Habbo Packet Explaining

    It's for coders you don't need to understand it ;x



Advertisement