Jump to content

porexemplo

Member
  • Posts

    13
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by porexemplo

  1. Might help:

     

    bool DESC::HandshakeProcess(DWORD dwTime, long lDelta, bool bInfiniteRetry)
    {
    	DWORD dwCurTime = get_dword_time();
    
    	if (lDelta < 0)
    	{
    		sys_err("Desc::HandshakeProcess : value error (lDelta %d, ip %s)", lDelta, m_stHost.c_str());
    		return false;
    	}
    
    	int bias = (int) (dwCurTime - (dwTime + lDelta));
    
    	if (bias >= 0 && bias <= 50)
    	{
    		if (bInfiniteRetry)
    		{
    			BYTE bHeader = HEADER_GC_TIME_SYNC;
    			Packet(&bHeader, sizeof(BYTE));
    		}
    
    		if (GetCharacter())
    			sys_log(0, "Handshake: client_time %u server_time %u name: %s", m_dwClientTime, dwCurTime, GetCharacter()->GetName());
    		else
    			sys_log(0, "Handshake: client_time %u server_time %u", m_dwClientTime, dwCurTime, lDelta);
    
    		m_dwClientTime = dwCurTime;
    		m_bHandshaking = false;
    		return true;
    	}
    
    	long lNewDelta = (long) (dwCurTime - dwTime) / 2;
    
    	if (lNewDelta < 0)
    	{
    		sys_log(0, "Handshake: lower than zero %d", lNewDelta);
    		lNewDelta = (dwCurTime - m_dwHandshakeSentTime) / 2;
    	}
    
    	sys_log(1, "Handshake: ServerTime %u dwTime %u lDelta %d SentTime %u lNewDelta %d", dwCurTime, dwTime, lDelta, m_dwHandshakeSentTime, lNewDelta);
    
    	if (!bInfiniteRetry)
    		if (++m_iHandshakeRetry > HANDSHAKE_RETRY_LIMIT)
    		{
    			sys_err("handshake retry limit reached! (limit %d character %s)",
    					HANDSHAKE_RETRY_LIMIT, GetCharacter() ? GetCharacter()->GetName() : "!NO CHARACTER!");
    			SetPhase(PHASE_CLOSE);
    			return false;
    		}
    
    	SendHandshake(dwCurTime, lNewDelta);
    	return false;
    }

     

    • Facepalm 1
  2. Hi community!

    Since the big release of ms5.7 source the people can now edit new servers without any knowledge of C++ and what concerns me is that the db still uses MD5 passwords.


    I've been trying to follow the tutorials on the web, I find 2 similar, I followed all the rules to implement this argon2 algorithm password.
     



    And another from an old external source:

    https://www.metin2downloads.to/thread/13106-implementation-of-a-cryptographically-secure-password-hash-function-with-libsodi/


    Here are the files that I tried to edit (ms5.7) but can't access the account at game. Wrong Password.

    db.h:

    https://pastebin.com/RnBZa5Te

    input_auth.cpp:

    https://pastebin.com/EMz5sPVb

    db.cpp

    https://pastebin.com/eEbaEDEk


    Hope someone can help me 😉 or contact me via MP.

  3. Here are some cool stuff:

    I installed this files on a Freebsd 64 VPS Server. Its working now after:
     

    • some problem with libIL.so.1 fixed by applying on /usr/lib32 from metin2.download

     

     

    Where I change login image from client-side? (I'm a little rusted)

    • maybe create a href just to use one login and select.jpg on all languages from clientside?
  4. 2 hours ago, TMP4 said:

    No it won't work on FreeBSD11. I'm sure it is harder to recompile it in FreeBSD11.x so do not downgrade your system.

    My personal opinion if a hosting does not let you use custom ISO and does not update the installable os every few months, just leave. You gonna use 12.0 when 14.0 releases soon?

    Thank you.

    Can you check if the shut.sh on your files are working well?

    #!/bin/sh
    echo -e "All Processes Terminated"
    killall game db


    I think I made this change, and it worked like a charm.

  5. 2 hours ago, TMP4 said:

    There are 2 problems here.

    1.)

    The precompiled game and db was compiled in FreeBSD 13.1 so it won't work on FreeBSD 12.
    You can update your system to 13.1 or you have to recompile the game and db in a FreeBSD 12.x version.

    2.)

    Metin2 (game,db file) is an x32 application with x32 dependencies. Just like windows, you can run x32 applications on x64 systems, don't worry. The problem here is the dependencies. Pkg installs x64 packages (libs/dependencies) while Metin2 needs x32 dependencies. I attached a libs.zip in the mega archive with tutorial to install x32 dependencies manually what is a dirty method but it is what it is. There's no plan for me to port it to x64, that wouldn't be "reference" anymore.


    Thanks for the elaborated reply @ TMP4

    I bought a VPS from BF, and they don't have a 13.0+ ISO (I already talk to the team, asking for)

    I'm trying to update the BSD to 13, but it takes a long time. Furthermore, I'm not sure if they blocked the OS update.

    Should it work on FreeBSD 11 x32 ? Or I have to compile?

×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.