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

TFS 1.X+ TFS 1.5 772 nekiro's downgrade - bigger packet size and Otcv8 features causing server crash on login

jakub742

Member
Joined
May 1, 2010
Messages
144
Solutions
2
Reaction score
20
Location
Slovakia
Hi, i was trying to edit sources to increasing packet size and also sending otcv8 features to client.
This commit: OTCv8 detection, custom features packet, bigget packet size and bug f… · OTCv8/forgottenserver@2839d4d (https://github.com/OTCv8/forgottenserver/commit/2839d4d7a8ad3597eff6c786f4ceb9b1b4b4456b)

It compiled ok, but when i login i get connection error and the server restarts and that moment. Idk what im doing wrong. Without it it works.
follow these steps it will work.

Code:
https://otland.net/threads/tfs-1-5-downgrade-nekiro-7-72-add-in-game-shop-otclientv8.284755/#post-2723492
 
follow these steps it will work.

Code:
https://otland.net/threads/tfs-1-5-downgrade-nekiro-7-72-add-in-game-shop-otclientv8.284755/#post-2723492
Tried that it was almost the same as the commit i used before, and still not working.
Server is running but when i log in it automatically crashes, dont know why.

1683645459017.png
 
Tried that it was almost the same as the commit i used before, and still not working.
Server is running but when i log in it automatically crashes, dont know why.

View attachment 75465
change the key.pem


Code:
-----BEGIN RSA PRIVATE KEY-----
MIICXAIBAAKBgQCbZGkDtFsHrJVlaNhzU71xZROd15QHA7A+bdB5OZZhtKg3qmBWHXzLlFL6AIBZ
SQmIKrW8pYoaGzX4sQWbcrEhJhHGFSrT27PPvuetwUKnXT11lxUJwyHFwkpb1R/UYPAbThW+sN4Z
MFKKXT8VwePL9cQB1nd+EKyqsz2+jVt/9QIDAQABAoGAQovTtTRtr3GnYRBvcaQxAvjIV9ZUnFRm
C7Y3i1KwJhOZ3ozmSLrEEOLqTgoc7R+sJ1YzEiDKbbete11EC3gohlhW56ptj0WDf+7ptKOgqiEy
Kh4qt1sYJeeGz4GiiooJoeKFGdtk/5uvMR6FDCv6H7ewigVswzf330Q3Ya7+jYECQQER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dZaZ7Rrx8HUTwSOS/fwhsGWBbl1Qzhdq/6/sIfEHkfeH
1hoH+IlpuPuf21MdAqvJt+cMwoECQF1LyBOYduYGcSgg6u5mKVldhm3pJCA+ZGxnjuGZEnet3qeA
eb05++112fyvO85ABUun524z9lokKNFh45NKLjUCQGshzV43P+RioiBhtEpB/QFzijiS4L2HKNu1
tdhudnUjWkaf6jJmQS/ppln0hhRMHlk9Vus/bPx7LtuDuo6VQDo=
-----END RSA PRIVATE KEY-----
i have the same key
Post automatically merged:

Tried to generate a new key with OTS RSA Generator (https://ots.me/rsa/)
After recompiling, server was running fine, otclientv8 had older OTSERV_RSA to test if the server will crash on login. It obviously did not with the wrong key. After changing the
OTSERV_RSA in client the same thing happened, when i logged in the server crashed and restarted. Idk if its crashing on decrypt/encrypt or what. I guess i'll try to build it on my windows computer and try to debug that because i have no idea where the problem is.
 
Last edited:
i have the same key
Post automatically merged:

Tried to generate a new key with OTS RSA Generator (https://ots.me/rsa/)
After recompiling, server was running fine, otclientv8 had older OTSERV_RSA to test if the server will crash on login. It obviously did not with the wrong key. After changing the
OTSERV_RSA in client the same thing happened, when i logged in the server crashed and restarted. Idk if its crashing on decrypt/encrypt or what. I guess i'll try to build it on my windows computer and try to debug that because i have no idea where the problem is.
your problem is in rsa, I also had the same.
 
it was RSA that gave this problem, you just need to calmly "COPY" and "PASTE" correctly without errors then recompile
How is this a RSA problem when im using the default one from OTClientv8 and TFS. The same that posted @Forkz here. It should work with the default one right ? Tried custom just for testing purposes. I used gesior's OTS RSA Generator (https://ots.me/rsa/) tool. I generated new keys, took key.pem to TFS recompiled and pasted the N (modulus) - for OTClient into const.h. Same behaviour as with the default RSA. Server is running but when i connect with client it will crash the server.

It was working with default keys. But after trying this commit its not working (not even with new key): OTCv8 detection, custom features packet, bigget packet size and bug f… · OTCv8/forgottenserver@2839d4d (https://github.com/OTCv8/forgottenserver/commit/2839d4d7a8ad3597eff6c786f4ceb9b1b4b4456b#diff-0ac48e116773f94794384faa2005802f970883b286811fcb44057e44b9140c8c)
 
Bump. Got back to the issue cant connect to server after applying following changes:
OTCv8 detection, custom features packet, bigget packet size and bug f… · OTCv8/forgottenserver@2839d4d (https://github.com/OTCv8/forgottenserver/commit/2839d4d7a8ad3597eff6c786f4ceb9b1b4b4456b#diff-0ac48e116773f94794384faa2005802f970883b286811fcb44057e44b9140c8c)

C++:
static constexpr int32_t NETWORKMESSAGE_MAXSIZE = 65500;

Even when changing this from 35650 causing restart when trying to log in with the client. Without any other changes. Its not RSA related like Mateus said. I tried the one from master branch and even my own generator key and everyhing works without changes from this commit.
 
Bump. Got back to the issue cant connect to server after applying following changes:
OTCv8 detection, custom features packet, bigget packet size and bug f… · OTCv8/forgottenserver@2839d4d (https://github.com/OTCv8/forgottenserver/commit/2839d4d7a8ad3597eff6c786f4ceb9b1b4b4456b#diff-0ac48e116773f94794384faa2005802f970883b286811fcb44057e44b9140c8c)

C++:
static constexpr int32_t NETWORKMESSAGE_MAXSIZE = 65500;

Even when changing this from 35650 causing restart when trying to log in with the client. Without any other changes. Its not RSA related like Mateus said. I tried the one from master branch and even my own generator key and everyhing works without changes from this commit.
Just copy the key.pem from version 7.72 and it will work, I don't know why when I downloaded it, it was from version 8.6.
 
Just copy the key.pem from version 7.72 and it will work, I don't know why when I downloaded it, it was from version 8.6.
Where can i find it ? in nekiro sources both branches 772 and 860 has the same. But i have my own key.pem and custom key in otcv8 so it should work either way right ?
 
Without adding this to ProtocolGame::login its working fine

C++:
// OTCv8 features and extended opcodes
    if (otclientV8 || operatingSystem >= CLIENTOS_OTCLIENT_LINUX) {
        if(otclientV8)
            sendFeatures();
        NetworkMessage opcodeMessage;
        opcodeMessage.addByte(0x32);
        opcodeMessage.addByte(0x00);
        opcodeMessage.add<uint16_t>(0x00);
        writeToOutputBuffer(opcodeMessage);
    }
Post automatically merged:

Ok so instead of this, i put this at the start of the ProtocolGame::login

Lua:
    // OTCv8 features and extended opcodes
    if (operatingSystem >= CLIENTOS_OTCLIENT_LINUX) {
        sendFeatures();
    }

I left this part in ProtocolGame::eek:nRecvFirstMessage where it previously was

C++:
if (operatingSystem >= CLIENTOS_OTCLIENT_LINUX) {
        NetworkMessage opcodeMessage;
        opcodeMessage.addByte(0x32);
        opcodeMessage.addByte(0x00);
        opcodeMessage.add<uint16_t>(0x00);
        writeToOutputBuffer(opcodeMessage);
}

Added otcv8 detection to protocolgame and protocollogin
C++:
    // OTCv8 version detection
    uint16_t otcV8StringLength = msg.get<uint16_t>();
    if(otcV8StringLength == 5 && msg.getString(5) == "OTCv8") {
        otclientV8 = msg.get<uint16_t>(); // 253, 260, 261, ...
    }

Its working in can log in without a problem. I even logged the otclientV8 to console
Code:
otclientv8 version: 310

I wanted to test this with the otclientV8 shop module but its empty. Have creaturescript, login event and latest shop.lua from otcv8-dev repo.
1687335897123.png
 
Last edited:
I had a TFS 1.5 source that allowed opening the store in OTClient, as I had already made the necessary additions to the source. However, upon realizing it, I noticed that there were some bugs that I didn't remember adding last. So I decided to download a clean source. I just forgot to add the store functionality in the source. Yesterday, when testing the purchase of some items in the OTClient store, to my surprise, the store module was not activated in the source. I remembered that I needed to add it and I did it in the source. I compiled again and it worked correctly. Now I can open the OTClient store normally.




Have you already added the necessary code in the lib/core/json.lua file??????? It is important to make this addition so that the OTClient store appears correctly.


lib/lib.lua
dofile('data/lib/core/json.lua')
 
I had a TFS 1.5 source that allowed opening the store in OTClient, as I had already made the necessary additions to the source. However, upon realizing it, I noticed that there were some bugs that I didn't remember adding last. So I decided to download a clean source. I just forgot to add the store functionality in the source. Yesterday, when testing the purchase of some items in the OTClient store, to my surprise, the store module was not activated in the source. I remembered that I needed to add it and I did it in the source. I compiled again and it worked correctly. Now I can open the OTClient store normally.




Have you already added the necessary code in the lib/core/json.lua file??????? It is important to make this addition so that the OTClient store appears correctly.


lib/lib.lua
The problem was indeed in json.lua
Thanks man its visible now
 
Back
Top