Simple Client Emulator in Node

Results 1 to 9 of 9
  1. #1
    o/ Konquer is offline
    MemberRank
    Apr 2014 Join Date
    464Posts

    Simple Client Emulator in Node

    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




    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 Code:
    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(44));

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

    Download


  2. #2
    Valued Member treebeard is offline
    MemberRank
    Jun 2018 Join Date
    Middle EarthLocation
    102Posts

    Re: Simple Client Emulator in Node

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

    & who knows, perhaps this will turn into a full fledged development thread.

  3. #3
    Apprentice JoshuaS is offline
    MemberRank
    Apr 2018 Join Date
    10Posts

    Re: Simple Client Emulator in Node

    Says it's depreceated: https://imgur.com/a/aAbbMJ8

    - - - Updated - - -

    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.

  4. #4
    o/ Konquer is offline
    MemberRank
    Apr 2014 Join Date
    464Posts

    Re: Simple Client Emulator in Node

    Quote Originally Posted by JoshuaS View Post
    Says it's depreceated: https://imgur.com/a/aAbbMJ8

    - - - Updated - - -

    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.

  5. #5
    Proficient Member billsonnn is offline
    MemberRank
    Jan 2013 Join Date
    157Posts

    Re: Simple Client Emulator in Node

    Working great for me although I haven't tested anything past the SSO. Any way of decoding the response packets?

  6. #6
    o/ Konquer is offline
    MemberRank
    Apr 2014 Join Date
    464Posts

    Re: Simple Client Emulator in Node

    Quote Originally Posted by billsonnn View Post
    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.

  7. #7
    Proficient Member billsonnn is offline
    MemberRank
    Jan 2013 Join Date
    157Posts

    Re: Simple Client Emulator in Node

    Quote Originally Posted by Konquer View Post
    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!

  8. #8
    Member ZoekGamer is offline
    MemberRank
    Dec 2015 Join Date
    En tu mirada.Location
    66Posts

    Re: Simple Client Emulator in Node

    headers for comet emu?

  9. #9
    Alpha Member Moogly is offline
    MemberRank
    Feb 2008 Join Date
    Pool LidoLocation
    2,322Posts

    Re: Simple Client Emulator in Node

    Good job, most of us just use Tanji for this sort of thing. Tanji is like a damn IDE these days.



Advertisement