[Tutorial] How to find client version - Source Code change

Results 1 to 4 of 4
  1. #1
    Registered rafaelvidal is offline
    MemberRank
    Sep 2007 Join Date
    14Posts

    [Tutorial] How to find client version - Source Code change

    [Tutorial] How to find client version - Source Code change
    I'll show below how to find the client version and the path I walked to get there (source code change).
    You don't have to rebuild the source code. It's just curiosity for those interested on it.


    PROBLEM
    When you try to log in using any DR client you may receive the following message:

    "Your version is not up-to-date. Please go to 'http://forum.dr-int.com' to receive an update."

    CAUSE
    This occurs because the client and server are running different versions.


    SOLUTION
    Change client or server side to the same version number.

    I actually only know how to change server version, so that's what is shown below.

    Client version is a secret number called "MY_CODE" and it's stored in the top of the files proxyserver.ini, dbdemon.ini and agentserver.ini.

    Example:
    proxyserver.ini
    Code:
    [extra]
    MY_CODE = 3124
    statuspath=C:\drserver\statuslog.txt
    
    [nation_set]
    nation_name = USA
    BETA_SERVER = 1
    
    [server_set_info]
    own_server_set_number = 100
    default_max_user_can_login = 500
    default_max_user_can_login_per_sec = 50
    
    [server_info]
    own_server_ip_for_server=127.0.0.1
    own_server_port_for_server=3001
    own_server_ip_for_user=127.0.0.1
    own_server_port_for_user=9004
    primary_proxy_server_ip=127.0.0.1
    primary_proxy_server_port=3001
    secondary_proxy_server_ip=127.0.0.1
    secondary_proxy_server_port=3002
    
    [server_manager]
    num_of_available_manager_ip = 1
    manager_ip0 = 127.0.0.1
    [external_server_info]
    num_of_external_servers = 104
    To find the client version (MY_CODE), you need to:

    1 - Attempt to log in using any info (example: user: 1, pass:1);

    2 - Watch DBDemon logs (picture 2) and look for MY_CODE*;

    3 - Now, get this number and change it on the files (proxyserver.ini, dbdemon.ini and agentserver.ini).

    *Since the DBDemon version I had didn't output MY_CODE, I've modified the source code to show it and recompiled. Download my DBDemon.exe here.


    HOW TO CHANGE THE SOURCE CODE

    I won't describe how to setup an environment, because I myself don't know it well, and because it would take a lot of time.
    But considering you already have "Microsoft Visual Studio C++" installed, I'll show where you change the source code so it outputs the client MY_CODE when a login attempt occurs.

    1- Open DBDemon project;

    2- Open DragonLogInServer.cpp;

    3- Look for the following code:
    ::MyLog( 0, "Not match MY_CODE : ID[ %s ] - IP[ %s ]", pCN->id, pCN->ip_address );

    4- Change it to:
    ::MyLog( 0, "Not match MY_CODE : ID[ %s ] - IP[ %s ] - MY_CODE[ %d] ", pCN->id, pCN->ip_address, code );

    5- Rebuild the project (it's called ultra_server in the source I have);

    6- Take the new DBDemon.exe from the Debug folder and place it in your DRserver folder (c:\DRServer\DBdemon\);

    7- Restart the server (proxy, dbdemon and agent), attempt to login and see the magic. Now it will output the MY_CODE;

    8- Change it in the server files and you will be able to log in.


    Click image for larger version. 

Name:	client-not-up-to-date.JPG 
Views:	60 
Size:	67.0 KB 
ID:	166215Click image for larger version. 

Name:	dbdemon-my_code.JPG 
Views:	49 
Size:	66.6 KB 
ID:	166217Click image for larger version. 

Name:	same-version.JPG 
Views:	43 
Size:	66.4 KB 
ID:	166214Click image for larger version. 

Name:	login-success.JPG 
Views:	45 
Size:	103.6 KB 
ID:	166213Click image for larger version. 

Name:	source-code-change.JPG 
Views:	42 
Size:	127.9 KB 
ID:	166216
    Last edited by rafaelvidal; 26-11-19 at 11:05 PM.


  2. #2
    Registered pzlilei is offline
    MemberRank
    Apr 2020 Join Date
    5Posts

    Re: [Tutorial] How to find client version - Source Code change

    我可以在没有可用源代码的情况下上传副本吗?我有源代码的副本,但出现cl.exe错误。我的英语不好,对不起

    - - - Updated - - -

    Is there any source code that can be used? There is a cl.exe error when compiling DragonLogInServer.cpp in my source code! For help. My English is not good, sorry.

    - - - Updated - - -

    Can you upload a usable client, thank you very much!

  3. #3
    Registered rafaelvidal is offline
    MemberRank
    Sep 2007 Join Date
    14Posts

    Re: [Tutorial] How to find client version - Source Code change

    I'll try to upload the client I used.

  4. #4
    Registered pzlilei is offline
    MemberRank
    Apr 2020 Join Date
    5Posts

    Re: [Tutorial] How to find client version - Source Code change

    Hello, when can you upload the available client, thank you!



Advertisement