Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Patch bots [Plus Emulator]

Skilled Illusionist
Joined
Jul 2, 2009
Messages
313
Reaction score
139
Hi all,

RELEASE63-201405071257-197450526

A very easy and small fix to patch these "bots" everybody is releasing now these days.

I don't know if Habbo uses the same packet ID for these things. But as the most of you know there is packet with number 340. This will send the variables.txt location which you are currently using.

Bots do not have external_variables, bots are being send on another way. There for you can use this packet in order to check your variables link.

How do I install it?
Browse to "Events.cs" and Add the following packet in the list:

Code:
internal static int ClientVars = 340;

Now browse to StaticClientMessageHandler.cs and Search for:
Code:
handlers.Add(Incoming.LoadProfile, new StaticRequestHandler(SharedPacketLib.LoadProfile));

Paste the following rule after this line:
Code:
handlers.Add(Incoming.ClientVars, new StaticRequestHandler(SharedPacketLib.CheckClientVars));

Now go to "Requests->Users.cs" and find "GetBalance()". Paste this new internal void there.
Code:
internal void CheckClientVars()
        {
            string unnecessaryJunk = Request.PopFixedString();
            string RequestedVariables = Request.PopFixedString();

            if (RequestedVariables == "" || !RequestedVariables.Contains("external_variables.txt"))
            {
                Silverwave.Core.Logging.WriteLine("[ClientMgr] User tried to authenticate without the real external variables from this hotel - request has been blocked.");
                Session.Disconnect();

                return;
            }
        }

Also add this to your sharedlib:
Code:
internal static void ClientVars(GameClientMessageHandler handler)
        {
            handler.ClientVars();
        }
Make sure your variables "contains" ..../external_variables.txt" or change the "Contains" part in the "void CheckClientVars()".

Credits to:
Mextur -> Teaching me .NET in the first place.
EvilCoder {me} (I like to mess around with unused packets. I found this one during my unhandled packetlog)
Bjork (Finding the necassery structure (not 1 string, but 2) thx).

Don't forget the thx button ++ This is not a permanent fix. But the released bots for now are patched!

Kind regards,
Mikey
 
Last edited:
Joined
Apr 24, 2007
Messages
644
Reaction score
157
It need two strings, the second contains the external_variables link.

And "Session.GetHabbo().Username" makes the packeterror

Like this, it seems to be working:

Code:
internal void CheckClientVars()
        {
            string Junk = Request.PopFixedString();
            string RequestedVariables = Request.PopFixedString();

            if (!RequestedVariables.Contains("external_variables.txt"))
            {
                Session.Disconnect();
                return;
            }            
        }
 
Skilled Illusionist
Joined
Jul 2, 2009
Messages
313
Reaction score
139
What you also could do is make it:

Code:
if (RequestedVariables != "" && !RequestedVariables.Contains("external_variables.txt"))



It need two strings, the second contains the external_variables link.

And "Session.GetHabbo().Username" makes the packeterror

Like this, it seems to be working:

Code:
internal void CheckClientVars()
        {
            string Junk = Request.PopFixedString();
            string RequestedVariables = Request.PopFixedString();

            if (!RequestedVariables.Contains("external_variables.txt"))
            {
                Session.Disconnect();
                return;
            }            
        }

I see.. Then remove that part and make it say:
Code:
Silverwave.Core.Logging.LogException("User tried to authenticate without the real external variables from this hotel - this has been blocked.");



It need two strings, the second contains the external_variables link.

And "Session.GetHabbo().Username" makes the packeterror

Like this, it seems to be working:

Code:
internal void CheckClientVars()
        {
            string Junk = Request.PopFixedString();
            string RequestedVariables = Request.PopFixedString();

            if (!RequestedVariables.Contains("external_variables.txt"))
            {
                Session.Disconnect();
                return;
            }            
        }

Also updated the function in main thread. Thanks!



Gosh I hate bots like hell... People who invented this should not share this. All the noobs are now downloading this program and spamming hotels. So annoying.
 
Skilled Illusionist
Joined
Jul 2, 2009
Messages
313
Reaction score
139
Is this possible on r63a? Example Phoenix.

It should be, log your packets during login. And look if you see an unhandled packet saying the link of your external variables. If so, you need to use the "number" in front of that message. That would be the correct packetnumber.

You could even check the "base" location. Which is the buzzhotel.info/game/ link in the screenshot, and the "unnecessaryJunk" string var.
EvilCoder - Patch bots [Plus Emulator] - RaGEZONE Forums
 
Newbie Spellweaver
Joined
Jul 18, 2014
Messages
85
Reaction score
39
It should be, log your packets during login. And look if you see an unhandled packet saying the link of your external variables. If so, you need to use the "number" in front of that message. That would be the correct packetnumber.

You could even check the "base" location. Which is the buzzhotel.info/game/ link in the screenshot, and the "unnecessaryJunk" string var.
EvilCoder - Patch bots [Plus Emulator] - RaGEZONE Forums

Tested it out. God dam there isin't that packet! ;(

EDIT: Only 482 isin't handled and its EventLogMessageEvent

EDIT2: Too 3110 and its GetMOTDMessageEvent sooo... not important.
 
Last edited:
Junior Spellweaver
Joined
Nov 11, 2012
Messages
144
Reaction score
11
You also need to add
Code:
internal static void ClientVars(GameClientMessageHandler handler)
        {
            handler.ClientVars();
        }
to your sharedpacketlib.cs
 
RaGEZONE VIP
[VIP] Member
Joined
Aug 13, 2014
Messages
121
Reaction score
239
Not sure if the original hotel was also using this as a security measure, but you could get around it, by just doing the exact same thing the client would do:
UXOvCdz - Patch bots [Plus Emulator] - RaGEZONE Forums


Of course, you'd need to adjust it to the hotel's 'ext_vars' link. There really isn't a way to patch these types of bots, but you could make it harder/troublesome for the user by hiding this type of information from the user.
 

Attachments

You must be registered for see attachments list
Joined
Aug 10, 2011
Messages
7,398
Reaction score
3,301
Seriously? You think this is going to prevent any bots from popping up in your hotel?

They just have to modify their program so it sends the external_variables.

Why aren't you guys smarter. Why not put a time limit on how long the SSO can stays valid. The SSO gets updated in the users table once the client loads and then it connects to the emulator.
About 20 seconds tops.

There are other ways to verify if the client is a bot or not. MUS / RCON for example.

Think out of the box and not any hardcoded stuff.
 
Skilled Illusionist
Joined
Aug 16, 2007
Messages
343
Reaction score
263
Asking an user a simple question using the Habbo Poll system on every login is enough to avoid 100% of the current bots mechanisms. It's easy to patch, but still.
 
Skilled Illusionist
Joined
Dec 20, 2013
Messages
365
Reaction score
64
Asking an user a simple question using the Habbo Poll system on every login is enough to avoid 100% of the current bots mechanisms. It's easy to patch, but still.
Sry to going off topic lol but do u still develop or did u completly stop ?
 
Skilled Illusionist
Joined
Aug 16, 2007
Messages
343
Reaction score
263
Sry to going off topic lol but do u still develop or did u completly stop ?

I work/study 12 hours a day. Althrough I enjoy reversing Habbo, I'm 20 yo already, the game itself is for teens. I only played it for the girls. I didn't stop but my free time is very limited. I'm planning something cool for my next vacation. On my last one I revised Plus Emulator. I don't really do release a lot of useful material but the ones I make proved to be well accepted. Looking foward for the next one :blush:
 
Skilled Illusionist
Joined
Jul 2, 2009
Messages
313
Reaction score
139
Seriously? You think this is going to prevent any bots from popping up in your hotel?

They just have to modify their program so it sends the external_variables.

Why aren't you guys smarter. Why not put a time limit on how long the SSO can stays valid. The SSO gets updated in the users table once the client loads and then it connects to the emulator.
About 20 seconds tops.

There are other ways to verify if the client is a bot or not. MUS / RCON for example.

Think out of the box and not any hardcoded stuff.

I said it was a small fix. I did not said it was a permanent fix. This is just temporarily. I also posted that the noobs are entering your hotel with these bots. They don't know how to fix this. Unless somebody posts another bot which has this prevented. In that case I will find something else. I don't really care. I can have other fixes posted for example only 2 session per ip. Or re-create the ipban. Which then will kill all the clients with the ip also, instead of just banning them. It really does not matter, like I said it was a temp fix.



You also need to add
Code:
internal static void ClientVars(GameClientMessageHandler handler)
        {
            handler.ClientVars();
        }
to your sharedpacketlib.cs

Thanks I forgot this.



Not sure if the original hotel was also using this as a security measure, but you could get around it, by just doing the exact same thing the client would do:
UXOvCdz - Patch bots [Plus Emulator] - RaGEZONE Forums


Of course, you'd need to adjust it to the hotel's 'ext_vars' link. There really isn't a way to patch these types of bots, but you could make it harder/troublesome for the user by hiding this type of information from the user.

There is another packet which checks your user_agent. Don't seem to remember which one that was. Could you also fake that one? You probably can right? Because the client is sending the user_agent to the emulator. What the client can do the bot program also can do.
 

Attachments

You must be registered for see attachments list
Back
Top