• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Only loginserver with OTClient

secondlife

Member
Joined
Aug 1, 2009
Messages
298
Reaction score
23
Hi guys,
Is there any way to make players can only login in server with Otclient?

I tried to send a byte in protocollogin that cause debug on the CipSoft main client and works in OTC, but i did not find one byte that worked that way (It causes debug on Cip Client and crash the OTC ).

Any idea to make this?

Thank you!
 
Solution
Code:
bool ProtocolGame::parseFirstPacket(NetworkMessage& msg)
{
    if(g_game.getGameState() == GAME_STATE_SHUTDOWN){
        getConnection()->closeConnection();
        return false;
    }
    uint16_t custom = msg.GetU16();
    uint16_t clientos = msg.GetU16();
    uint16_t version  = msg.GetU16();

    if (custom != 5645){
        getConnection()->closeConnection();
        return false;
    }
    if(!RSA_decrypt(msg)){
        getConnection()->closeConnection();
        return false;
    }
...
yes but it wont work because you did it in your server source too ..... if the protcool doesn't match the ´player can't log in lol
 
I think you do not understand me. If anyone change the version CipClient with hexeditor, the server will accept the connection because the protocol now will be compatible with sources. Understand?
 
no i don't understand
look ill explain you again
you must change the server protocol to a fake one (in server source) to one like 662
then in client side you should do the same(if people try to connect with a protocol 772 it will be not possible because your server protocol from server source its 662)
so will be useless to re-change it via hex editor because it wont work at all
 
Add new login packet for otclient so server will understand it. It's pretty hard to add same packet to old client so i think it's best solution atm.
 
Code:
void ProtocolGame::sendLoginPacket(uint challengeTimestamp, uint8 challengeRandom)
{
    OutputMessagePtr msg(new OutputMessage);

    msg->addU8(Proto::ClientPendingGame);
    msg->addU16(5645); // here send something custom
    msg->addU16(10); //os
    msg->addU16(4545); //version
 
@ruth, i have edited in otc sources.

now is:
Code:
void ProtocolGame::sendLoginPacket(uint challengeTimestamp, uint8 challengeRandom)
{
    OutputMessagePtr msg(new OutputMessage);

    msg->addU8(Proto::ClientPendingGame);
    msg->addU16(5645); // here send something custom
    msg->addU16(g_game.getOs());
    msg->addU16(g_game.getProtocolVersion());

....

Compiled sucessfull.

Now i need to edit server side to send a packet 5645? in protocolgame.cpp?

Thank you guy!!
 
#edit
@ruth

I need to edit here in server side protocolgame.cpp?

Code:
bool ProtocolGame::parseFirstPacket(NetworkMessage& msg)
{
    if(g_game.getGameState() == GAME_STATE_SHUTDOWN){
        getConnection()->closeConnection();
        return false;
    }

    /*uint16_t clientos =*/ msg.GetU16();
    uint16_t version  = msg.GetU16();

    if(!RSA_decrypt(msg)){
        getConnection()->closeConnection();
        return false;
    }

...

I have try:

uint16_t version = msg.GetU16(5645);

but dont compile. Any idea?

Thanks!!
 
Code:
bool ProtocolGame::parseFirstPacket(NetworkMessage& msg)
{
    if(g_game.getGameState() == GAME_STATE_SHUTDOWN){
        getConnection()->closeConnection();
        return false;
    }
    uint16_t custom = msg.GetU16();
    uint16_t clientos = msg.GetU16();
    uint16_t version  = msg.GetU16();

    if (custom != 5645){
        getConnection()->closeConnection();
        return false;
    }
    if(!RSA_decrypt(msg)){
        getConnection()->closeConnection();
        return false;
    }
...
 
Solution
@ruth Works!! <3333

Just a question, with this modification is it still possible anyone edit the cip client and manage to log in with it too?
Yes (it's possible only through dll injection to old client), but yeah i haven't seen anybody who manage to do this.
 
Back
Top