Jump to content
  • Join-Us

    https://metin2.dev is the 1st international community on Metin2 development. Join us to develop your skills and share your knowledge with the community, respectful and ethical forum.

Fix unknown header 100% server: 1k player online francec


Draveniou1

Recommended Posts

  • Bronze

This is the hidden content, please

Metin2 Download

 

I do this topic for those who have a problem with Unknown Header operating server in France with 800-1k player online and it has been working for 5 days without problems and without kick

This is the hidden content, please

 

If you have provlem :

Open in game.py

search and remove:

        if constInfo.SEQUENCE_PACKET_ENABLE:
            net.SetPacketSequenceMode()

 

Now open constinfo.py and search and remove

SEQUENCE_PACKET_ENABLE = 1

----------------------------------------------------------------------------------------------

 

Source Client:

Search 

return SendSequence();

change with

// return disable;

 

Edited by Draveniou1
For client with provlem OPEN
  • Metin2 Dev 144
  • Love 38
  • Love 2
  • Good 34
  • Lmao 4
  • Scream 1
  • Think 7
  • Not Good 3
  • Angry 1
  • Dislove 2
Link to comment
Share on other sites

!-->
  • Gold

Bruh!
People removed this sequence shit since 2015.
And thanks for sharing.

Edited by MrQuin
  • Metin2 Dev 2
  • Love 2

My only accounts are here and on M2D, Don't trust anyone else from other shitty sites.

Link to comment
Share on other sites

Where is true in packet_info.cpp I get errors. For example:

packet_info.cpp:210:71: error: no matching function for call to 'CPacketInfoCG::Set(<unnamed enum>, unsigned int, const char [9], bool)'
  Set(HEADER_CG_TIME_SYNC, sizeof(TPacketCGHandshake), "TimeSync", true);

Edited by Suzar
Link to comment
Share on other sites

  • Bronze
7 hours ago, Suzar said:

Where is true in packet_info.cpp I get errors. For example:

packet_info.cpp:210:71: error: no matching function for call to 'CPacketInfoCG::Set(<unnamed enum>, unsigned int, const char [9], bool)'
  Set(HEADER_CG_TIME_SYNC, sizeof(TPacketCGHandshake), "TimeSync", true);

  Set(HEADER_CG_TIME_SYNC, sizeof(TPacketCGHandshake), "TimeSync", true);

to  

  Set(HEADER_CG_TIME_SYNC, sizeof(TPacketCGHandshake), "TimeSync");

 

remove all  , true);  from all  HEADER  you see good my tutorial 😄

send me PM for can help you if you have problem again

Edited by Draveniou1
Link to comment
Share on other sites

  • Premium

: 'CPythonNetworkStream::SendQuickSlotMovePacket' : not all control paths return a value
: 'CPythonNetworkStream::SendQuickSlotDelPacket' : not all control paths return a value
: 'CPythonNetworkStream::SendQuickSlotAddPacket' : not all control paths return a value
: 'CPythonNetworkStream::SendItemPickUpPacket' : not all control paths return a value
 'CPythonNetworkStream::SendItemDestroyPacket' : not all control paths return a value
 'CPythonNetworkStream::SendItemDropPacketNew' : not all control paths return a value
 'CPythonNetworkStream::SendItemDropPacket' : not all control paths return a value
 'CPythonNetworkStream::SendItemUseToItemPacket' : not all control paths return a value
 'CPythonNetworkStream::SendShopSellPacketNew' : not all control paths return a value
 'CPythonNetworkStream::SendShopSellPacket' : not all control paths return a value
 'CPythonNetworkStream::SendShopEndPacket' : not all control paths return a value
 'CPythonNetworkStream::SendShopBuyPacket' : not all control paths return a value

I recevive lot warings like this 🙂 from binary.. i do like here:
https://metin2.download/picture/2jDxRA4ub3gfF84ZD4D8gwaIT8Hm8U1L/.png

Edited by Metin2 Dev
Core X - External 2 Internal

Respect!

Link to comment
Share on other sites

  • Bronze
9 minutes ago, CatalinDB said:

: 'CPythonNetworkStream::SendQuickSlotMovePacket' : not all control paths return a value
: 'CPythonNetworkStream::SendQuickSlotDelPacket' : not all control paths return a value
: 'CPythonNetworkStream::SendQuickSlotAddPacket' : not all control paths return a value
: 'CPythonNetworkStream::SendItemPickUpPacket' : not all control paths return a value
 'CPythonNetworkStream::SendItemDestroyPacket' : not all control paths return a value
 'CPythonNetworkStream::SendItemDropPacketNew' : not all control paths return a value
 'CPythonNetworkStream::SendItemDropPacket' : not all control paths return a value
 'CPythonNetworkStream::SendItemUseToItemPacket' : not all control paths return a value
 'CPythonNetworkStream::SendShopSellPacketNew' : not all control paths return a value
 'CPythonNetworkStream::SendShopSellPacket' : not all control paths return a value
 'CPythonNetworkStream::SendShopEndPacket' : not all control paths return a value
 'CPythonNetworkStream::SendShopBuyPacket' : not all control paths return a value

I recevive lot warings like this 🙂 from binary.. i do like here:
https://metin2.download/picture/80tzpEsGSrWhXk9MlPi3KHlZkmbPt4GA/.png

Search :

SendQuickSlotMovePacket
SendQuickSlotDelPacket'
SendQuickSlotAddPacket'
SendItemPickUpPacket'
SendItemDestroyPacket' 
SendItemDropPacketNew' 
SendItemDropPacket'
SendItemUseToItemPacket
SendShopSellPacketNew' 
SendShopSellPacket'
SendShopEndPacket'
SendShopBuyPacket'

 

change:

return sendsequence();

with:

return false;

 

 

 

Edited by Metin2 Dev
Core X - External 2 Internal
  • Lmao 1
Link to comment
Share on other sites

  • Bronze
5 minutes ago, CatalinDB said:

return false from everywhere where was return sendsequence();? is much more than here 🙂 i post just one part... 

All return false;      all    send sequence

Edited by Draveniou1
Link to comment
Share on other sites

What in this case? return true; or return false; ?

File: PythonNetworkStreamPhaseGame.cpp

Spoiler

bool CPythonNetworkStream::__SendCRCReportPacket()
{
    /*
    DWORD dwProcessCRC = 0;
    DWORD dwFileCRC = 0;
    CFilename exeFileName;
    //LPCVOID c_pvBaseAddress = NULL;

    GetExeCRC(dwProcessCRC, dwFileCRC);

    CFilename strRootPackFileName = CEterPackManager::Instance().GetRootPacketFileName();
    strRootPackFileName.ChangeDosPath();

    TPacketCGCRCReport kReportPacket;

    kReportPacket.header = HEADER_CG_CRC_REPORT;
    kReportPacket.byPackMode = CEterPackManager::Instance().GetSearchMode();
    kReportPacket.dwBinaryCRC32 = dwFileCRC;
    kReportPacket.dwProcessCRC32 = dwProcessCRC;
    kReportPacket.dwRootPackCRC32 = GetFileCRC32(strRootPackFileName.c_str());

    if (!Send(sizeof(kReportPacket), &kReportPacket))
        Tracef("SendClientReportPacket Error");

    return SendSequence();
    */    
    return true;
}

 

Edited by Suzar
Link to comment
Share on other sites

  • Bronze
5 hours ago, Suzar said:

What in this case? return true; or return false; ?

File: PythonNetworkStreamPhaseGame.cpp

  Reveal hidden contents

bool CPythonNetworkStream::__SendCRCReportPacket()
{
    /*
    DWORD dwProcessCRC = 0;
    DWORD dwFileCRC = 0;
    CFilename exeFileName;
    //LPCVOID c_pvBaseAddress = NULL;

    GetExeCRC(dwProcessCRC, dwFileCRC);

    CFilename strRootPackFileName = CEterPackManager::Instance().GetRootPacketFileName();
    strRootPackFileName.ChangeDosPath();

    TPacketCGCRCReport kReportPacket;

    kReportPacket.header = HEADER_CG_CRC_REPORT;
    kReportPacket.byPackMode = CEterPackManager::Instance().GetSearchMode();
    kReportPacket.dwBinaryCRC32 = dwFileCRC;
    kReportPacket.dwProcessCRC32 = dwProcessCRC;
    kReportPacket.dwRootPackCRC32 = GetFileCRC32(strRootPackFileName.c_str());

    if (!Send(sizeof(kReportPacket), &kReportPacket))
        Tracef("SendClientReportPacket Error");

    return SendSequence();
    */    
    return true;
}

 

normal why is there / * .... * /  You put it as you want return false; or return true;

Link to comment
Share on other sites

No offense, but I find this tutorial very inaccurate, you can get very confused .. If you had the time it would be nice if you shared the .cpp / .h files that are already edited, I think a lot of people would be grateful and there would be no questions

Link to comment
Share on other sites

  • Bronze
1 minute ago, Suzar said:

No offense, but I find this tutorial very inaccurate, you can get very confused .. If you had the time it would be nice if you shared the .cpp / .h files that are already edited, I think a lot of people would be grateful and there would be no questions

I know If you want help I can help you, send me a message and I will help you [free help]

Link to comment
Share on other sites

  • Bronze

12. And today shared Fix sequence from internal packet ❤️ 

1) open input.cpp 

search:

bool CInputProcessor::Process(LPDESC lpDesc, const void * c_pvOrig, int iBytes, int & r_iBytesProceed)
..............
............
......
    return true;
}

 

change with :

int g_iLastPacket[2] = { -1, -1 };
bool CInputProcessor::Process(LPDESC lpDesc, const void * c_pvOrig, int iBytes, int & r_iBytesProceed)
{
	const char * c_pData = (const char *) c_pvOrig;

	int		iPacketLen;

	if (!m_pPacketInfo)
	{
		sys_err("No packet info has been binded to");
		return true;
	}

	for (m_iBufferLeft = iBytes; m_iBufferLeft > 0;)
	{
		BYTE bHeader = (BYTE) *(c_pData);
		const char * c_pszName;

		if (bHeader == 0)
			iPacketLen = 1;
		else if (!m_pPacketInfo->Get(bHeader, &iPacketLen, &c_pszName))
		{
			lpDesc->SetPhase(PHASE_CLOSE);
			return true;
		}

		if (m_iBufferLeft < iPacketLen)
			return true;

		int originalPacketSize = iPacketLen;
		BYTE preAnalyzeSeq = *(BYTE*)(c_pData + iPacketLen - sizeof(BYTE));

		if (bHeader)
		{
			if (test_server && bHeader != HEADER_CG_MOVE)
				sys_log(0, "Packet Analyze [Header %d][bufferLeft %d] ", bHeader, m_iBufferLeft);

			m_pPacketInfo->Start();

			int iExtraPacketSize = Analyze(lpDesc, bHeader, c_pData);

			if (iExtraPacketSize < 0)
			{
#ifdef ENABLE_ANTI_PACKET_FLOOD
				sys_err("Failed to analyze header(%u) host(%s)", bHeader, inet_ntoa(lpDesc->GetAddr().sin_addr));
				lpDesc->SetPhase(PHASE_CLOSE);
#endif
				return true;
			}

			iPacketLen += iExtraPacketSize;
			lpDesc->Log("%s %d", c_pszName, iPacketLen);
			m_pPacketInfo->End();
		}

		c_pData	+= iPacketLen;
		m_iBufferLeft -= iPacketLen;
		r_iBytesProceed += iPacketLen;

		g_iLastPacket[1] = g_iLastPacket[0];
		g_iLastPacket[0] = bHeader;

		if (GetType() != lpDesc->GetInputProcessor()->GetType())
			return false;
	}

	return true;
}

 

Edited by Draveniou1
fix:2 anti-flood and internal flood
  • Metin2 Dev 1
Link to comment
Share on other sites

  • Bronze
14 hours ago, bossy_max said:

how can I do this?

Need 1 example

EXAMPLE:

CLIENTSIDE:
typedef struct command_login3
{
    BYTE	header;
    char	name[ID_MAX_NUM + 1];
    char	pwd[PASS_MAX_NUM + 1];
    DWORD	adwClientKey[4];
#ifdef PROTECT_KEY_FROM_HACKERS
	long		28374235784954363253456345346346345634563456678678977823834681293345634563456675674784784574124792375237;
//max hacker 255  :) not unlock
#endif
} TPacketCGLogin3;

SERVERSIDE:
typedef struct command_login3
{
	BYTE	header;
	char	login[LOGIN_MAX_LEN + 1];
	char	passwd[PASSWD_MAX_LEN + 1];
	DWORD	adwClientKey[4];
#ifdef PROTECT_KEY_FROM_HACKERS
	long		28374235784954363253456345346346345634563456678678977823834681293345634563456675674784784574124792375237;
#endif
} TPacketCGLogin3;



SERVICE CLIENT/SERVER
#define PROTECT_KEY_FROM_HACKERS



Hackers can not find more than 250 BYTES as the number 28374235784954363253456345346346345634563456678678977823834681293345634563456675674784784574124792375237 
It will protect you

 

Edited by Draveniou1
  • Lmao 1
  • Confused 1
Link to comment
Share on other sites

  • Premium
43 minutes ago, Draveniou1 said:

Need 1 example

EXAMPLE:

CLIENTSIDE:
typedef struct command_login3
{
    BYTE	header;
    char	name[ID_MAX_NUM + 1];
    char	pwd[PASS_MAX_NUM + 1];
    DWORD	adwClientKey[4];
#ifdef PROTECT_KEY_FROM_HACKERS
	long		28374235784954363253456345346346345634563456678678977823834681293345634563456675674784784574124792375237;
//max hacker 255  :) not unlock
#endif
} TPacketCGLogin3;

SERVERSIDE:
typedef struct command_login3
{
	BYTE	header;
	char	login[LOGIN_MAX_LEN + 1];
	char	passwd[PASSWD_MAX_LEN + 1];
	DWORD	adwClientKey[4];
#ifdef PROTECT_KEY_FROM_HACKERS
	long		28374235784954363253456345346346345634563456678678977823834681293345634563456675674784784574124792375237;
#endif
} TPacketCGLogin3;



SERVICE CLIENT/SERVER
#define PROTECT_KEY_FROM_HACKERS



Hackers can not find more than 250 BYTES as the number 28374235784954363253456345346346345634563456678678977823834681293345634563456675674784784574124792375237 
It will protect you

 

I can find that key in 1min. What are you doing here is a bad practice, you can trick just the  kids. 

  • Good 1
Link to comment
Share on other sites

  • Bronze
5 minutes ago, Jira said:

I can find that key in 1min. What are you doing here is a bad practice, you can trick just the  kids. 


I do not think the key can be found because it has more than 250 BYTES

 

 

So it can be found

long 250  easy found bytes it

Edited by Draveniou1
Link to comment
Share on other sites

  • Bronze
On 10/15/2021 at 2:35 AM, bossy_max said:

how can I do this?

Today creating new version for key

 

1) open in packet.h  serverside/clientside packet.h

search:

command_login2

command_login3

command_login5

 

add:

#ifdef PROTECTION_PACKET
    int    bloPakediMiet[8];
    long    bloPwerdiMiet[9];
    int    bloPtwejiMiet[8];
    long    bloPgssdfiMiet[9];
    int    bloPghcvMiet[8];
    long    bloPghdsdiMiet[9];
    int    bloPaiopryiMiet[8];
#endif

 

open service.h / locale_inc.h

add

#ifdef PROTECTION_PACKET

 

 

 

After 20-30 days 

change name from code

    int    bloPakediMiet[8];
    long    bloPwerdiMiet[9];
    int    bloPtwejiMiet[8];
    long    bloPgssdfiMiet[9];
    int    bloPghcvMiet[8];
    long    bloPghdsdiMiet[9];
    int    bloPaiopryiMiet[8];

 

example:

    int    wertgwertgetgrgergrgyergh[8];
    long    fghfghfgjfgjhfgjhdfhdhd[9];
    int    AWERWQRWQEREFRSF[8];
    long    gsdfsfwetwerwertfwetfwefwefgUiet[9];
    int    WETWETWERTFWEFTWEFTWEFGWE[8];
    long    SDFWETGERTGWETFWERFWRFWQRQWRQWRt[9];
    int    WETFWEWETFGWETGWETGWEGWGWETGTG[8];
 

 

after 20 days again rename BYTES

 

    int    wertgwertgetdfgsdfgsdgdsfggrgergrgyergh[8];
    long    fghfghfgjfgsdfsdfsdfgjhfgjhdfhdhd[9];
    int    AWERWQRWsdfgsdgfsdgsdQEREFRSF[8];
    long    gsdfsfwetwersdgsdfgsdgwertfwetfwefwefgUiet[9];
    int    WETWETWdfgdfgdfgfghERTFWEFTWEFTWEFGWE[8];
    long    SDFWETGfhdfhdfghERTGWETFWERFWRFWQRQWRQWRt[9];
    int    WETFWEWEfgsdsdhgsdsdghsdghsdTFGWETGWETGWEGWGWETGTG[8];

 

 

 

Link to comment
Share on other sites

24 minutes ago, Draveniou1 said:

Today creating new version for key

 

1) open in packet.h  serverside/clientside packet.h

search:

command_login2

command_login3

command_login5

 

add:

#ifdef PROTECTION_PACKET
    int    bloPakediMiet[8];
    long    bloPwerdiMiet[9];
    int    bloPtwejiMiet[8];
    long    bloPgssdfiMiet[9];
    int    bloPghcvMiet[8];
    long    bloPghdsdiMiet[9];
    int    bloPaiopryiMiet[8];
#endif

 

open service.h / locale_inc.h

add

#ifdef PROTECTION_PACKET

 

 

 

After 20-30 days 

change name from code

    int    bloPakediMiet[8];
    long    bloPwerdiMiet[9];
    int    bloPtwejiMiet[8];
    long    bloPgssdfiMiet[9];
    int    bloPghcvMiet[8];
    long    bloPghdsdiMiet[9];
    int    bloPaiopryiMiet[8];

 

example:

    int    wertgwertgetgrgergrgyergh[8];
    long    fghfghfgjfgjhfgjhdfhdhd[9];
    int    AWERWQRWQEREFRSF[8];
    long    gsdfsfwetwerwertfwetfwefwefgUiet[9];
    int    WETWETWERTFWEFTWEFTWEFGWE[8];
    long    SDFWETGERTGWETFWERFWRFWQRQWRQWRt[9];
    int    WETFWEWETFGWETGWETGWEGWGWETGTG[8];
 

 

after 20 days again rename BYTES

 

    int    wertgwertgetdfgsdfgsdgdsfggrgergrgyergh[8];
    long    fghfghfgjfgsdfsdfsdfgjhfgjhdfhdhd[9];
    int    AWERWQRWsdfgsdgfsdgsdQEREFRSF[8];
    long    gsdfsfwetwersdgsdfgsdgwertfwetfwefwefgUiet[9];
    int    WETWETWdfgdfgdfgfghERTFWEFTWEFTWEFGWE[8];
    long    SDFWETGfhdfhdfghERTGWETFWERFWRFWQRQWRQWRt[9];
    int    WETFWEWEfgsdsdhgsdsdghsdghsdTFGWETGWETGWEGWGWETGTG[8];

 

 

 

Im sorry but... whats exactly the new version here really?

No new packing, no new encryption, hell, not even adding a placebo argument.

Since when changing variable names at the source code impacts anything when you leave the functions exactly as they are?

One can easilly identify it, it just a non-sense waste of time im my opinion.

Link to comment
Share on other sites

  • Bronze
3 minutes ago, TheLionIK said:

Im sorry but... whats exactly the new version here really?

No new packing, no new encryption, hell, not even adding a placebo argument.

Since when changing variable names at the source code impacts anything when you leave the functions exactly as they are?

One can easilly identify it, it just a non-sense waste of time im my opinion.

With this method I am always safe in packets of course everyone has their own way for security in packets I work with BYTES because hackers can not break them

With 1k player online server I was always safe no one could damage my server as long as these BYTES existed

Because you have heard various things about it you think it is not a good solution just try it and you will find that it is a correct solution

 

But I try to make a better security in lib 

I need to deal more with lib and not with packet.h  So that I do not have to constantly make new BYTE

 

 

Link to comment
Share on other sites

  • Bronze
19 minutes ago, Draveniou1 said:

With this method I am always safe in packets of course everyone has their own way for security in packets I work with BYTES because hackers can not break them

With 1k player online server I was always safe no one could damage my server as long as these BYTES existed

Because you have heard various things about it you think it is not a good solution just try it and you will find that it is a correct solution

 

But I try to make a better security in lib 

I need to deal more with lib and not with packet.h  So that I do not have to constantly make new BYTE

 

 

Maybe they didn't because your server is not that popular. Your method is so fucked up and no one should use that. Yes I agree with a single byte argument for version control or smth but wtf is this ?

    int    wertgwertgetdfgsdfgsdgdsfggrgergrgyergh[8];
    long    fghfghfgjfgsdfsdfsdfgjhfgjhdfhdhd[9];
    int    AWERWQRWsdfgsdgfsdgsdQEREFRSF[8];
    long    gsdfsfwetwersdgsdfgsdgwertfwetfwefwefgUiet[9];
    int    WETWETWdfgdfgdfgfghERTFWEFTWEFTWEFGWE[8];
    long    SDFWETGfhdfhdfghERTGWETFWERFWRFWQRQWRQWRt[9];
    int    WETFWEWEfgsdsdhgsdsdghsdghsdTFGWETGWETGWEGWGWETGTG[8];

Do you realize your login it's going to be very slow if that packet is large ? 

And who the fuck said you can't find the key if it's stored in 250 bytes ? 

Link to comment
Share on other sites

  • Bronze
4 minutes ago, Abel(Tiger) said:

Maybe they didn't because your server is not that popular. Your method is so fucked up and no one should use that. Yes I agree with a single byte argument for version control or smth but wtf is this ?

    int    wertgwertgetdfgsdfgsdgdsfggrgergrgyergh[8];
    long    fghfghfgjfgsdfsdfsdfgjhfgjhdfhdhd[9];
    int    AWERWQRWsdfgsdgfsdgsdQEREFRSF[8];
    long    gsdfsfwetwersdgsdfgsdgwertfwetfwefwefgUiet[9];
    int    WETWETWdfgdfgdfgfghERTFWEFTWEFTWEFGWE[8];
    long    SDFWETGfhdfhdfghERTGWETFWERFWRFWQRQWRQWRt[9];
    int    WETFWEWEfgsdsdhgsdsdghsdghsdTFGWETGWETGWEGWGWETGTG[8];

Do you realize your login it's going to be very slow if that packet is large ? 

And who the fuck said you can't find the key if it's stored in 250 bytes ? 

 

Can't find the key because it is in BYTE up 250 // long fghfghfgjfgsdfsdfsdfgjhfgjhdfhdhd [9]? 9x100 900 BYTE -100 byte after login it is safe try to break it you will not be able to

 

If it wasn't safe I wouldn't post it

 

It will also not be delayed, ... because you have deactivated the send packet 

Link to comment
Share on other sites

  • Bronze
18 minutes ago, Draveniou1 said:

 

Can't find the key because it is in BYTE up 250 // long fghfghfgjfgsdfsdfsdfgjhfgjhdfhdhd [9]? 9x100 900 BYTE -100 byte after login it is safe try to break it you will not be able to

 

If it wasn't safe I wouldn't post it

 

It will also not be delayed, ... because you have deactivated the send packet 

So you think that long array it's 900 bytes ? :))) It's actualy 36 bytes (288 bits) and yeah it can be found. This how it looks in memory (initialized with 1)

screenshot-831.png

And this is how it looks if it's 250+ bytes

screenshot-832.png

 

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • Bronze
1 minute ago, Abel(Tiger) said:

So you think that long array it's 900 bytes ? :))) It's actualy 36 bytes (288 bits) and yeah it can be found. This how it looks in memory (initialized with 1)

screenshot-831.png

And this is how it looks if it's 250+ bytes

screenshot-832.png

 

I know you look but it will not work because it has random BYTES long [9]

I Can creating my client and you search my Byte and not  fghfghfgjfgsdfsdfsdfgjhfgjhdfhdhd

https://metin2.download/picture/uExhR11ob5J3S2er5cM9lkSq0Aqm69z8/.png

 

 

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites



×
×
  • 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.