Jump to content

How to fix / inspect these Unknown packet header errors?


Go to solution Solved by Thanatos,

Recommended Posts

Hello,

 

I wonder...is there any method to inspect these Unknown packet header error's to get rid of them. I hate to search my whole code for that shit ._.

 

Sometimes it takes Days to find the error. I know it can be a wrong data type / size whatever, but there must be a method to inspect these.

 

Let's disscuss this a little bit.

 

Thank you

Link to comment
Share on other sites

  • 3 months later...
  • Solution

so first time if you have a unknow header:97 last 75,75(per exemple) you have 3.4 five filles to verify:

-packet.h from client.Just ctrl+f and search 97 value..if dont aprea its not a problem

-search in game source in common/tables.h and again search value 97  here you have more change to find this value and see where you have an mistake.In my case 97 is:

	HEADER_DG_GUILD_WAR			= 97,

so till now i have an clue named guid_war...ok lets find the problem and i search in same fille:

typedef struct SPacketGuildWar

and we will see that:

typedef struct SPacketGuildWar
{
	BYTE	bType;
	BYTE	bWar;
	DWORD	dwGuildFrom;
	DWORD	dwGuildTo;
	long	lWarPrice;
	long	lInitialScore;
} TPacketGuildWar;

now we have to pay atention on entire insctruction!Must be the same with that from client source!

But you can fint that in packet.h from client source.

and if  i search i find this:

typedef struct packet_guild_war
{
    DWORD       dwGuildSelf;
    DWORD       dwGuildOpp;
    BYTE        bType;
    BYTE        bWarState;
} TPacketGCGuildWar;
typedef struct packet_guild_war
{
    DWORD       dwGuildSelf;
    DWORD       dwGuildOpp;
    BYTE        bType;
    BYTE        bWarState;
} TPacketGCGuildWar;

typedef struct SPacketGuildWarPoint
{
    DWORD dwGainGuildID;
    DWORD dwOpponentGuildID;
    long lPoint;
} TPacketGuildWarPoint;

we must compare all the types of function from each fille to be the same.I see that BYTE bType is the same that i will not have an error with header...But where i can find other function like 

DWORD       dwGuildOpp;

to identify them?

Now search in client source in userinterface/pythonguild to verify if the function are the same.

 

 

Another trick to find where you have the error and where you have modified use winmerge(this if you have a unmodifier source of your client)

 

I hope it will help you!And sorry for my english.

  • Love 7
Link to comment
Share on other sites

  • 4 weeks later...

Keep in mind that Unknown packet headers do not only happen on static packets but due to misreads of dynamic ones or simply because Metin2 temporary buffers suck and they get overriden and used for other stuff while processing the packet, so when the packet handler receives the control back its all messed up (yay).

Edited by Think
  • Love 1
Link to comment
Share on other sites

  • 2 weeks later...

so first time if you have a unknow header:97 last 75,75(per exemple) you have 3.4 five filles to verify:

-packet.h from client.Just ctrl+f and search 97 value..if dont aprea its not a problem

-search in game source in common/tables.h and again search value 97  here you have more change to find this value and see where you have an mistake.In my case 97 is:

	HEADER_DG_GUILD_WAR			= 97,

so till now i have an clue named guid_war...ok lets find the problem and i search in same fille:

typedef struct SPacketGuildWar

and we will see that:

typedef struct SPacketGuildWar
{
	BYTE	bType;
	BYTE	bWar;
	DWORD	dwGuildFrom;
	DWORD	dwGuildTo;
	long	lWarPrice;
	long	lInitialScore;
} TPacketGuildWar;

now we have to pay atention on entire insctruction!Must be the same with that from client source!

But you can fint that in packet.h from client source.

and if  i search i find this:

typedef struct packet_guild_war
{
    DWORD       dwGuildSelf;
    DWORD       dwGuildOpp;
    BYTE        bType;
    BYTE        bWarState;
} TPacketGCGuildWar;
typedef struct packet_guild_war
{
    DWORD       dwGuildSelf;
    DWORD       dwGuildOpp;
    BYTE        bType;
    BYTE        bWarState;
} TPacketGCGuildWar;

typedef struct SPacketGuildWarPoint
{
    DWORD dwGainGuildID;
    DWORD dwOpponentGuildID;
    long lPoint;
} TPacketGuildWarPoint;

we must compare all the types of function from each fille to be the same.I see that BYTE bType is the same that i will not have an error with header...But where i can find other function like 

DWORD       dwGuildOpp;

to identify them?

Now search in client source in userinterface/pythonguild to verify if the function are the same.

 

 

Another trick to find where you have the error and where you have modified use winmerge(this if you have a unmodifier source of your client)

 

I hope it will help you!And sorry for my english.

so first time if you have a unknow header:97 last 75,75(per exemple) you have 3.4 five filles to verify:

-packet.h from client.Just ctrl+f and search 97 value..if dont aprea its not a problem

-search in game source in common/tables.h and again search value 97  here you have more change to find this value and see where you have an mistake.In my case 97 is:

	HEADER_DG_GUILD_WAR			= 97,

so till now i have an clue named guid_war...ok lets find the problem and i search in same fille:

typedef struct SPacketGuildWar

and we will see that:

typedef struct SPacketGuildWar
{
	BYTE	bType;
	BYTE	bWar;
	DWORD	dwGuildFrom;
	DWORD	dwGuildTo;
	long	lWarPrice;
	long	lInitialScore;
} TPacketGuildWar;

now we have to pay atention on entire insctruction!Must be the same with that from client source!

But you can fint that in packet.h from client source.

and if  i search i find this:

typedef struct packet_guild_war
{
    DWORD       dwGuildSelf;
    DWORD       dwGuildOpp;
    BYTE        bType;
    BYTE        bWarState;
} TPacketGCGuildWar;
typedef struct packet_guild_war
{
    DWORD       dwGuildSelf;
    DWORD       dwGuildOpp;
    BYTE        bType;
    BYTE        bWarState;
} TPacketGCGuildWar;

typedef struct SPacketGuildWarPoint
{
    DWORD dwGainGuildID;
    DWORD dwOpponentGuildID;
    long lPoint;
} TPacketGuildWarPoint;

we must compare all the types of function from each fille to be the same.I see that BYTE bType is the same that i will not have an error with header...But where i can find other function like 

DWORD       dwGuildOpp;

to identify them?

Now search in client source in userinterface/pythonguild to verify if the function are the same.

 

 

Another trick to find where you have the error and where you have modified use winmerge(this if you have a unmodifier source of your client)

 

I hope it will help you!And sorry for my english.

This won't always work. For example I have

Unknown packet header: 235, last: 251 250

and there is no packet 235 in source.

 

 

Link to comment
Share on other sites

  • 2 years later...
  • 2 months later...
En 15/7/2015 a las 4:19, Think dijo:

Keep in mind that Unknown packet headers do not only happen on static packets but due to misreads of dynamic ones or simply because Metin2 temporary buffers suck and they get overriden and used for other stuff while processing the packet, so when the packet handler receives the control back its all messed up (yay).

I apologize for reliving this thread but how do you fix this?

Link to comment
Share on other sites

  • 4 months later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



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