Simple Client Emulator in Node

Joined
Apr 5, 2014
Messages
463
Reaction score
224
Simple node app for creating and maintaining client connections. Created this to do some stress testing.

  • Requires Nodejs
  • Assumes encryption is not enforced in the emulator
Konquer - Simple Client Emulator in Node - RaGEZONE Forums

Konquer - Simple Client Emulator in Node - RaGEZONE Forums
Konquer - Simple Client Emulator in Node - RaGEZONE Forums


In the video above (example.js) it's just using sso's 1-75 from the DB. It's up to you to write good stress tests. It's very easy to add new packets. Packet headers can be changed in messages/header.js

Straight forward example of a user authenticating, entering a room and moving to a square
PHP:
let client = new net.Socket();

client.connect(1232, '127.0.0.1', () => {  

 // User will authenticate with sso "2", enter room id 349, walk to x:4 y:4 
 client.write(ClientVersionMessage());
 client.write(SSOTicketMessage("2"));
 client.write(OpenFlatConnectionMessage(349));
 client.write(GetRoomEntryDataMessage());
 client.write(MoveAvatarMessage(4, 4));

});
Most of the encoding is from this release, thanks @Keiz

 
Always a pleasure to see someone else still working on Habbo development (:

& who knows, perhaps this will turn into a full fledged development thread.
 
Says it's depreceated:



It connects trough the cmd node panel, but no users spawn. I changed their auth_ticket/ssoticket to 2-21 and change it in app.js using the example and set everything as i can see it in the gif but still nothing shows up.
 
Says it's depreceated:



It connects trough the cmd node panel, but no users spawn. I changed their auth_ticket/ssoticket to 2-21 and change it in app.js using the example and set everything as i can see it in the gif but still nothing shows up.


It's only a deprecation warning, it won't break anything. You can get rid of it by replacing new Buffer(this._bytes) with one of the following
  • Buffer.from(this._bytes)
  • Buffer.alloc(this._bytes)
  • Buffer.allocUnsafe(this._bytes)
in the ClientPacket.js getBuffer() method.


Regarding it not working, it's probably because of one of these
1. Your emulator is forcing encryption
2. Your emulator is using headers from a different release
3. You did not change the IP or port to the one your emulator uses

You should debug your emulator and see if it receives any packets when running the app. If it does, check if the packet headers are correct and that it gets passed any encryption check.
 
Working great for me although I haven't tested anything past the SSO. Any way of decoding the response packets?

Not with what's included in this release I don't think. I do see the use for clients being able to respond appropriately to different server messages, so if/when I get around to doing that i'll update this thread.
 
Not with what's included in this release I don't think. I do see the use for clients being able to respond appropriately to different server messages, so if/when I get around to doing that i'll update this thread.

Awesome... I recoded this into Typescript and have some ideas for possibilities down the line!
 
Back