• 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!

help using old tibianic client and otclient as nastarius

CipsoftStinks

www.relicaria.com
Joined
Oct 1, 2016
Messages
947
Solutions
3
Reaction score
137
Location
Argentina
Hello otland

well i have the sources adapted to my server that it's otx2
to be compatible with the old tibianic client(just with old tibianic client)
but i want to also use otclient too... as nastarius
here error in console
Code:
 [Failure - Protocol::XTEA_decrypt] Not valid unencrypted message size (IP: 190xxxxxx249)
[11/8/2017 17:52:53] [Failure - Protocol::XTEA_decrypt] Not valid unencrypted message size (IP: 190.xxxx249)
[11/8/2017 17:52:54] [Failure - Protocol::XTEA_decrypt] Not valid unencrypted message size (IP: 190.4xxxx.

the codes XOR are related to tibianic client
could someone help me?
i have made some edition sometimes i get errors in console using otclient and others using old- tibianic
i want to be able to use both

editions in protocol.cpp related to my issues my tries to make it work
in this way i have the xtea errior using old tibianic(no errors when compiled)

no source edited
Code:
void Protocol::onRecvMessage(NetworkMessage& msg)
{
    #ifdef __DEBUG_NET_DETAIL__
    std::clog << "Protocol::onRecvMessage" << std::endl;
    #endif

    #ifdef _MULTIPLATFORM77
    if(m_encryptionEnabled)
    {
        #ifdef __DEBUG_NET_DETAIL__
        std::clog << "Protocol::onRecvMessage - decrypt" << std::endl;
        #endif
        if(!XTEA_decrypt(msg))
            return;
    }
    #endif

    parsePacket(msg);
}

just tibianic client code
Code:
void Protocol::onRecvMessage(NetworkMessage& msg)
{
    #ifdef __DEBUG_NET_DETAIL__
    std::clog << "Protocol::onRecvMessage" << std::endl;
    #endif

    #ifdef _MULTIPLATFORM77
    if (m_encryptionEnabled){
        XOR_decrypt(msg);
        if (!XTEA_decrypt(msg)) {
            return;
        }                             
    }

    #endif

    parsePacket(msg);
}

what i did (thinking that i could be able to use otc + tibianic client)
but with this code im having problem in console if i log in with tibianic
ofcourse i added definitions in protocol. h
no errors in console(while compiling etc)

Code:
void Protocol::onRecvXORMessage(NetworkMessage & msg)
{
#ifdef __DEBUG_NET_DETAIL__
    std::clog << "Protocol::onRecvMessage" << std::endl;
#endif

#ifdef _MULTIPLATFORM77
    if (m_encryptionEnabled) {
        XOR_decrypt(msg);
        if (!XTEA_decrypt(msg)) {
            return;
        }
}

#endif

    parsePacket(msg);
}

void Protocol::onRecvMessage(NetworkMessage& msg)
{
    #ifdef __DEBUG_NET_DETAIL__
    std::clog << "Protocol::onRecvMessage" << std::endl;
    #endif

    #ifdef _MULTIPLATFORM77
    if (m_encryptionEnabled){
     #ifdef __DEBUG_NET_DETAIL__
        std::clog << "Protocol::onRecvMessage - decrypt" << std::endl;
      #endif
        if (!XTEA_decrypt(msg)) {
            return;
        }                            
    }

    #endif

    parsePacket(msg);
}

pd:i also source edited otclient to sent a fake protocol

bump

bump

bump
 
Last edited by a moderator:
I was using something like this on Oldera. AFAIK Tibianic had same xor decryption.
C++:
void Protocol::onRecvMessage(NetworkMessage& msg)
{
    #ifdef __DEBUG_NET_DETAIL__
    std::cout << "Protocol::onRecvMessage" << std::endl;
    #endif

    #ifdef __PROTOCOL_77__
    if(m_encryptionEnabled){
        #ifdef __DEBUG_NET_DETAIL__
        std::cout << "Protocol::onRecvMessage - decrypt" << std::endl;
        #endif
           
        //OLDERA XOR SECURITY
        int read_pos = 0;
        char* buffer = (char*)msg.getBuffer();
        int32_t messageLength = msg.getMessageLength();
   
        messageLength >>= 2;
        for(int i = 0; i < messageLength; i++){
            buffer[read_pos+2] ^= 1;
            read_pos += 4;
        }
        //END OF OXS
        XTEA_decrypt(msg);
    }
    #endif // __PROTOCOL_77__
    parsePacket(msg);
}
Tested on Avesta.
 
I was using something like this on Oldera. AFAIK Tibianic had same xor decryption.
C++:
void Protocol::onRecvMessage(NetworkMessage& msg)
{
    #ifdef __DEBUG_NET_DETAIL__
    std::cout << "Protocol::onRecvMessage" << std::endl;
    #endif

    #ifdef __PROTOCOL_77__
    if(m_encryptionEnabled){
        #ifdef __DEBUG_NET_DETAIL__
        std::cout << "Protocol::onRecvMessage - decrypt" << std::endl;
        #endif
          
        //OLDERA XOR SECURITY
        int read_pos = 0;
        char* buffer = (char*)msg.getBuffer();
        int32_t messageLength = msg.getMessageLength();
  
        messageLength >>= 2;
        for(int i = 0; i < messageLength; i++){
            buffer[read_pos+2] ^= 1;
            read_pos += 4;
        }
        //END OF OXS
        XTEA_decrypt(msg);
    }
    #endif // __PROTOCOL_77__
    parsePacket(msg);
}
Tested on Avesta.
where should i add that?

i added at protocol.cpp in my server source but tibianic client doesnt works neither otclient
when i log in i cant walk
 
Last edited by a moderator:
you need to find xor key, reverse tibianic client, find hook on send and follow to dll, then look for xor function and change 1 to anything you find:
buffer[read_pos+2] ^= 1;
probably it may be first char of your account name/number.
 
Hello @Qbazzz @CipsoftStinks im looking exactly this, im using old medivia client
(at my server)i have the source at my server to use the old medivia client at my source
and i want to log into otclient too could u explain me a little bit more please?
im very glad to see this post
 
Back
Top