Jump to content

PM Flooder Kick Hack


Recommended Posts

 

 

 

You didn't have to give the actual link to this kick hack.. now i have to make lib for 34k coz kids are playing around^

 

Having the information public is the fastest way to get people to take action against it and the fix is in the thread. If you're able to create libs then it should be no problem for you

 

Also having the hack we could test if the c++ fix works :D

 

 

 

give me the hack for test in my server? Thank you

 

http://wklej.to/BZqOB

password: metin2dev

 

only for testing purposes only and i don't know this works because i didn't use it

 

While reading source, i think that, it is an older version of kick hack, because of using WHISPER instead of MESSENGER (friend adding.).

Regards..

  • Metin2 Dev 1
  • Lmao 1
Link to comment
Share on other sites

  • 1 month later...

 

error in compile:

 
messenger_manager.cpp: In member function 'bool MessengerManager::AuthToAdd(const std::string&, const std::string&, bool)':
messenger_manager.cpp:153: error: return-statement with no value, in function returning 'int'
gmake: *** [OBJDIR/messenger_manager.o] Error 1
gmake: *** Waiting for unfinished jobs....

 

you're returning a wrong value, please put here the line 153 of messenger_manager.cpp.

Link to comment
Share on other sites

  • 2 weeks later...
  • 7 months later...
  • 4 months later...
  • 1 month later...
  • 2 months later...
On 28.11.2014 at 7:16 PM, Sanchez said:

 

 

Hi everyone,

Maybe just in my country, but it looks so many people started using this annoying PM flooder which cause a buffer overflow in the target client. It can be fixed easily on server-side, so let's do it:

Add these functions as public to char.h:


    void ClearPMCounter(void)       { m_iPMCounter = 0;      } 
    void IncreasePMCounter(void)    { m_iPMCounter++;        }
    void SetLastPMPulse(void);
    int  GetPMCounter(void)   const { return m_iPMCounter;   }
    int  GetLastPMPulse(void) const { return m_iLastPMPulse; }
    

Add these to char.h too, but as protected:


int m_iLastPMPulse;
int m_iPMCounter;
    

Add this function to char.cpp:


void CHARACTER::SetLastPMPulse(void)
{
      m_iLastPMPulse = thecore_pulse() + 25;
}

Still in char.cpp search for the Initialize and add these to the function:


m_iLastPMPulse = 0;
m_iPMCounter = 0;

Now navigate to the Whisper function in input_main.cpp and add this after the iExtraLen variable checking at the top:


if (ch->GetLastPMPulse() < thecore_pulse())
     ch->ClearPMCounter();
     
if (ch->GetPMCounter() > 3 && ch->GetLastPMPulse() > thecore_pulse())
{
   ch->GetDesc()->SetPhase(PHASE_CLOSE);
   return -1;
} 

Search for this still in the Whisper function:


if (pkChr == ch)
    return (iExtraLen);
    

Add these after that:


ch->IncreasePMCounter();
ch->SetLastPMPulse();
    

 

Can you put there files with thease functions allrdy implemented please... ?

THNX !

Link to comment
Share on other sites

  • 9 months later...
On 30.12.2014 at 2:10 AM, Sanchez said:

Fix for the newly released lagger/kicker:
 
Replace the ACMD(do_messenger_auth) method with this:


	if (ch->GetArena())
	{
		ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("´ë·ĂŔ忡Ľ­ »çżëÇĎ˝Ç Ľö ľř˝Ŕ´Ď´Ů."));
		return;
	}

	char arg1[256], arg2[256];
	two_arguments(argument, arg1, sizeof(arg1), arg2, sizeof(arg2));

	if (!*arg1 || !*arg2)
		return;

	char answer = LOWER(*arg1);

	if (!MessengerManager::instance().AuthToAdd(ch->GetName(), arg2, answer == 'y' ? false : true))
		return;

	if (answer != 'y')
	{
		LPCHARACTER tch = CHARACTER_MANAGER::instance().FindPC(arg2);

		if (tch)
			tch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("%s ´ÔŔ¸·Î şÎĹÍ ÄŁ±¸ µî·ĎŔ» °ĹşÎ ´çÇß˝Ŕ´Ď´Ů."), ch->GetName());
	}

In messenger_manager.cpp replace the AuthToAdd method with this :


bool MessengerManager::AuthToAdd(MessengerManager::keyA account, MessengerManager::keyA companion, bool bDeny)
{
	DWORD dw1 = GetCRC32(companion.c_str(), companion.length());
	DWORD dw2 = GetCRC32(account.c_str(), account.length());

	char buf[64];
	snprintf(buf, sizeof(buf), "%u:%u", dw1, dw2);
	DWORD dwComplex = GetCRC32(buf, strlen(buf));

	if (m_set_requestToAdd.find(dwComplex) == m_set_requestToAdd.end())
	{
		sys_log(0, "MessengerManager::AuthToAdd : request not exist %s -> %s", companion.c_str(), account.c_str());
		return false;
	}

	m_set_requestToAdd.erase(dwComplex);

	if (!bDeny)
	{
		AddToList(companion, account);
		AddToList(account, companion);
	}

	return true;
}

In messenger_manager.h replace this:


void	AuthToAdd(keyA account, keyA companion, bool bDeny);

With this:


bool	AuthToAdd(keyA account, keyA companion, bool bDeny);

 

 

not work this annoying

Link to comment
Share on other sites

  • 6 months later...
On 11/29/2014 at 7:16 PM, Sanchez said:

 

 

Hi everyone,

Maybe just in my country, but it looks so many people started using this annoying PM flooder which cause a buffer overflow in the target client. It can be fixed easily on server-side, so let's do it:

Add these functions as public to char.h:


    void ClearPMCounter(void)       { m_iPMCounter = 0;      } 
    void IncreasePMCounter(void)    { m_iPMCounter++;        }
    void SetLastPMPulse(void);
    int  GetPMCounter(void)   const { return m_iPMCounter;   }
    int  GetLastPMPulse(void) const { return m_iLastPMPulse; }
    

Add these to char.h too, but as protected:


int m_iLastPMPulse;
int m_iPMCounter;
    

Add this function to char.cpp:


void CHARACTER::SetLastPMPulse(void)
{
      m_iLastPMPulse = thecore_pulse() + 25;
}

Still in char.cpp search for the Initialize and add these to the function:


m_iLastPMPulse = 0;
m_iPMCounter = 0;

Now navigate to the Whisper function in input_main.cpp and add this after the iExtraLen variable checking at the top:


if (ch->GetLastPMPulse() < thecore_pulse())
     ch->ClearPMCounter();
     
if (ch->GetPMCounter() > 3 && ch->GetLastPMPulse() > thecore_pulse())
{
   ch->GetDesc()->SetPhase(PHASE_CLOSE);
   return -1;
} 

Search for this still in the Whisper function:


if (pkChr == ch)
    return (iExtraLen);
    

Add these after that:


ch->IncreasePMCounter();
ch->SetLastPMPulse();
    

When I accept duel from anyoneI get disconnected.

Link to comment
Share on other sites

  • 2 months later...

is get this error

 


input_main.cpp: In member function 'int CInputMain::Whisper(CHARACTER*, const char*, size_t)':
input_main.cpp:287: error: 'class CHARACTER' has no member named 'GetLastPMPulse'
input_main.cpp:288: error: 'class CHARACTER' has no member named 'ClearPMCounter'
input_main.cpp:290: error: 'class CHARACTER' has no member named 'GetPMCounter'
input_main.cpp:290: error: 'class CHARACTER' has no member named 'GetLastPMPulse'
input_main.cpp:319: error: 'class CHARACTER' has no member named 'IncreasePMCounter'
input_main.cpp:320: error: 'class CHARACTER' has no member named 'SetLastPMPulse'
 

Link to comment
Share on other sites

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.