Ejemplo n.º 1
0
void CPacketCheckSum::Check(int aIndex)
{
	if ( gObj[aIndex].m_InWebzen != false )	// Olny for Local Test and Test Mains
	{
		return;
	}

	for ( int i=0 ; i<MAX_PACKET_CHECKSUM_FUNCTION_INDEX ; i++)
	{
		if ( this->PaketChecksum[aIndex].Check[i] == 0 )
		{
			char szPacketError[256];

			CLog.LogAdd("PacketCheckSum Error [%d][%s][%s] %d",
				aIndex, gObj[aIndex].AccountID, gObj[aIndex].Name, i);
			
			wsprintf(szPacketError, "PacketCheckSum Error %d", i);

			gSendHackLog.Send(aIndex, 1, szPacketError);	// Hack Log Server

			this->ClearCheckSum(aIndex);

			if ( gDisconnectHackUser != FALSE )
			{
				gObjCloseSet(aIndex, 0);
			}

			return;
		}
	}

	CLog.LogAdd("Check PacketCheckSum [%d][%s][%s]", aIndex, gObj[aIndex].AccountID, gObj[aIndex].Name);
	this->ClearCheckSum(aIndex);
}
Ejemplo n.º 2
0
void CPacketCheckSum::Check(int aIndex)
{
	if ( gObj[aIndex].m_InWebzen != false )	// Olny for Local Test and Test Mains
	{
		return;
	}

	for ( int i=0 ; i<MAX_PACKET_CHECKSUM_FUNCTION_INDEX ; i++)
	{
		if ( this->PaketChecksum[aIndex].Check[i] == 0 )
		{
			LogAddTD("PacketCheckSum Error [%d][%s][%s] %d",
				aIndex, gObj[aIndex].AccountID, gObj[aIndex].Name, i);
			
			this->ClearCheckSum(aIndex);

			if ( gDisconnectHackUser != FALSE )
			{
				gObjCloseSet(aIndex, 0);
			}

			return;
		}
	}

	LogAddTD("Check PacketCheckSum [%d][%s][%s]", aIndex, gObj[aIndex].AccountID, gObj[aIndex].Name);
	this->ClearCheckSum(aIndex);
}
Ejemplo n.º 3
0
BOOL CPacketCheckSum::Add(int aIndex, int funcindex, DWORD checksum)
{
	if ( gObj[aIndex].m_InWebzen != false )
	{
		return true;
	}

	if ( this->m_ChecksumTableAllClearState == 0 )
	{
		this->PaketChecksum[aIndex].Check[funcindex] = checksum;
		return TRUE;
	}
	
	if ( this->m_ChecksumTable[funcindex] == checksum )
	{
		this->PaketChecksum[aIndex].Check[funcindex] = checksum;
	}
	else
	{
		LogAddTD("PacketCheckSum : Compare Fail : [%d][%s][%s] (%d,%d)", aIndex,
			gObj[aIndex].AccountID, gObj[aIndex].Name, funcindex, checksum);

		if ( gDisconnectHackUser != FALSE )
		{
			gObjCloseSet(aIndex, 0);
		}
	}

	return TRUE;
}
Ejemplo n.º 4
0
BOOL CPacketCheckSum::Add(int aIndex, int funcindex, DWORD checksum)
{
	if ( gObj[aIndex].m_InWebzen != false )
	{
		return true;
	}

	if ( this->m_ChecksumTableAllClearState == 0 )
	{
		this->PaketChecksum[aIndex].Check[funcindex] = checksum;
		return TRUE;
	}
	
	if ( this->m_ChecksumTable[funcindex] == checksum )
	{
		this->PaketChecksum[aIndex].Check[funcindex] = checksum;
	}
	else
	{
		char szPacketError[256];

		LogAddTD("PacketCheckSum : Compare Fail : [%d][%s][%s] (%d,%d)", aIndex,
			gObj[aIndex].AccountID, gObj[aIndex].Name, funcindex, checksum);

		wsprintf(szPacketError, "PacketCheckSum : Compare Fail : (%d,%d)", funcindex, checksum);

		gSendHackLog.Send(aIndex, 1, szPacketError);

		if ( Configs.DisconnectHackUser != FALSE )
		{
			gObjCloseSet(aIndex, 0);
		}
	}

	return TRUE;
}