Updating header/packet IDs. (Not yet complete - Client only).

Have I written this tutorial good enough? Do you want more?


  • Total voters
    16
  • Poll closed .

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,199
3,934
So I thought its time to make my own tutorial, I'm aware there is more out there somewhere but meh here we go.

NOTE: This tutorial doesn't yet cover outgoing/server header IDs, as I noticed I made the thread kinda large. So I'll cover that after some replies etc.

Table of contents:
  • Requirements
  • Basic things to know.
  • Don't get confused.
  • What do we need to know?
  • We're ready, let's get started.
  • Preparing files.
  • Working on updating a client packet.
Requirements
  • (or some other IDE, I just prefer Notepad++ for this)
Basic things to know before we begin
The class we're working on is named HabboMessages. This name could change in future releases, if it does then.. how do we find it again? But also, how do we find it to start with?

1. We'll need to find it each time we want to update our headers, the main thing to remember is that there is a static header with the numeric value of '4000'. So we can simply search for it - both header types (event & composer) are in hashmaps. We can hit CTRL + F (on Windows), and search for [4000] and we'll find it. We may find it twice - but don't worry, there are ways to determine which is which. We'll discuss this soon.

2. Very simple, use the class name! Hit CTRL + F (on Windows), and search for "public class HabboMessages" and bam, we're there.

Don't get confused!
A lot of people address the packet IDs with a different name, or variation. They generally all mean the same thing. When you see people discuss; headers, packets, header ids, packet ids - they generally all mean the same thing. A packet structure isn't a header/packet ID however.

What else do we need before we begin?
We need to know what we're updating from and what we're updating to. We will start with 2 files and end up with 4. We require two SWFs, our current SWF and the SWF we're going to update to. Try to avoid naming your SWF "Habbo.swf", "Old.swf" or "New.swf", try to keep the revision name there or keep them in a folder named after the SWFs revision (E.g; RELEASE63-201502160844-186836974).

We're ready, let's begin.
First up, make a new folder (to be nice and organized) named "Updating" in that folder put your current SWF, in this example I'll be using RELEASE63-201502160844-186836974 as my current SWF (what I am using right now), next we need to get the SWF we'd like to update to - in this example I'll be using RELEASE63-201502191834-235884845. But how do we find this SWF? Easiest way is to navigator to Habbos client variables file, found . Hit CTRL + F to find "flash.client.url=" and the value should be (right now, it'll change soon) "//habboo-a.akamaihd.net/gordon/RELEASE63-201502191834-235884845/" navigator to that URL in your browser and simply add the file name - which has always been "Habbo.SWF", and hit CTRL + S to save it in the "Updating" folder. Remember what I said about naming it, if you're unsure what the revision is then in this case it's really simple to find out, it's the folder after /gordon/ in the URL.

Alright, we have 2 files - next!
You should have already installed AS3 Sorcerer and Notepad++ by now, so if you haven't go and quickly do that now. This next step is the easiest of all, simply click both of the SWFs you've downloaded (if it says choose a program to open the file with navigate to the path where AS33 Sorcerer installed and click the executable) other wise, AS3 Sorcerer will open up next simply click the highlighted button in the image below to save the entire SWF files into one file.

9uqo9yB.png


Assuming you've done that to both SWFs, you'll have 4 files now - also keep the file names AS33 Sorcerer gives you for those files, as it's just easier to determine what is what with the '_scripts' prefix. We're ready for the more challenging step now!

Woo, we have 4 files - almost there!
Open up both text documents (if they didn't automatically open already) into your preferred text editor, or (please for this tutorial) use Notepad++ as I'm using it, so the screenshots may help you a little.

So we have both files open, but we have to keep switching back and forth, urgh - wouldn't it just be easier to view them both at the same time? Yup. Right click on one of the file tabs and choose "Move to other view" as shown below.

2YJhtWW.png


Bingo! Now we can get down to the nitty gritty. But first, I'll show you what we discussed above, about finding the headers (packet IDs, packets, headers - whatever you want to address them as) which are all in the same class. So as said before there are two ways of doing this, I'll just show you one as I've explained them above.

I almost forgot to mention, make sure you know which SWF is what (old & new) I generally put the new one to the other view (on the right hand side), I suggest you do the same.

Right, using the old (current) SWF window, hit CTRL + F on your keyboard and type in '[4000]' and hit enter. I found two results, you may have only found one.

37FyhkY.png


And that's it really, we've found the class. I'm not going to explain further here, I just wanted to show you a picture of what you should be finding, perhaps I'll edit this area in the future to explain what I kinda want to say about this area (to help you identify event & composer easier).

Right, so we're at the class and are pretty much set to update our first header. This is where it gets a little complicated for a lot of people, as we need to find a header ID (again; packet, packet ID, whatever you've heard it addresses as before) from our server.

So, let us start off with updating a client/event header, for this example I'll be using one of the first few that are used.
PHP:
public const int InitCryptoMessageEvent = 1582;

Right, first things first - let us search '[1582]' in the old/current SWF text file (you're not going to be able to search this, as you'll most likely be on a different revision, so pick a header (client/event) and search for it.

Okay, I've found it and have one result:
PHP:
_-4g0[1582] = _-4xr;
So what does this mean? The header 1582 is in one of the two hashmaps and the value/identifier is '_-4xr' (an obfuscated value). So we can use this to help us (again, yours will be different - just go with the flow). Search for 'new _-4xr' but remember to have strict search settings, such as "Match case" as there could be another value which is "_-4Xr" and we may update to the wrong value due to not searching for the correct case.

XcgKd4K.png


So we've found it in our current SWF, but now how do we go about finding it in the other SWF? The new one. Simple! It's all about comparing the code and the area. So, what can we compare? Well, for me if I scroll up a tiny bit I can see a string, which will most likely have the same output in the other SWF, maybe it'll work? (Picture below)

Area of the searchable strings.
KFSGetO.png


Okay, so hopefully you can spot it instantly. Just inside of the try-catch, where the ErrorReportStorage reports an error, we can use some of that string, SOME.

Our searchable string.
Jmk3BOk.png


So we can use the above searchable string in the new SWF, and we should find it very easily. So let us copy & paste that line into the other window/area and search.
ZBI1nKb.png


Success! If you're picking this up fast then great, you should be able to spot the header from memory right there, if not - don't give up, you'll pick it up as time goes on. But to confirm, where is it? Let's compare both windows to see if we can spot it.

utuyajG.png


Do you see it yet? Notice the red highlighted area - that is our current SWF, on the right is the newest SWF. The header value is '_-4cV' bingo! Now lets find it, hit up CTRL + F and search for '= _-4cV;' (or the the equivalent for you).

PHP:
_-0Oa[470] = _-4cV;

Bingo! The header ID is 470. It's honestly this simple. however this is only for client packet IDs, I've started you off with client header IDs as they're the easiest. With outgoing/server packet IDs you have to go right into the function to compare. We'll work on this shortly.
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,199
3,934
I will do the server packet explanation sometime today, it may be in a separate thread due to this thread already being fairly large.

Then I'll post a thread regarding packet structures and more. :)
 

Yadz

Active Member
Feb 20, 2015
174
25
Where do I even put the reg key for the AS3 Sorcerer? Shouldn't a box appear when I open it?
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,199
3,934
Where do I even put the reg key for the AS3 Sorcerer? Shouldn't a box appear when I open it?

Oops, I should of mentioned that, my bad.

Go to: Help > About and there should be an input box or a button in that window. :p
 

adrienbart

New Member
Apr 9, 2013
3
2
I will do the server packet explanation sometime today, it may be in a separate thread due to this thread already being fairly large.

Then I'll post a thread regarding packet structures and more. :)
Thanks again for teaching us, it's really nice to help the community like this, I have rarely seen people that kind :)
 

Users who are viewing this thread

  • Top