Removed security & anti-cheat measures

This commit is contained in:
Exynox 2022-11-22 06:55:33 +02:00
parent acf55c35aa
commit bb44b31af9
31 changed files with 1 additions and 1143 deletions

View File

@ -25,10 +25,6 @@
#include "../EterBase/Debug.h" #include "../EterBase/Debug.h"
#include "../EterBase/CRC32.h" #include "../EterBase/CRC32.h"
#ifdef __THEMIDA__
#include <ThemidaSDK.h>
#endif
#include <iostream> #include <iostream>
#include <fstream> #include <fstream>
@ -585,10 +581,6 @@ bool CEterPack::Get(CMappedFile& out_file, const char * filename, LPCVOID * data
} }
else if (COMPRESSED_TYPE_HYBRIDCRYPT == index->compressed_type || COMPRESSED_TYPE_HYBRIDCRYPT_WITHSDB == index->compressed_type) else if (COMPRESSED_TYPE_HYBRIDCRYPT == index->compressed_type || COMPRESSED_TYPE_HYBRIDCRYPT_WITHSDB == index->compressed_type)
{ {
#ifdef __THEMIDA__
VM_START
#endif
CLZObject * zObj = new CLZObject; CLZObject * zObj = new CLZObject;
if( !m_pCSHybridCryptPolicy->DecryptMemory( std::string(filename), static_cast<const BYTE*>(*data), index->data_size, *zObj) ) if( !m_pCSHybridCryptPolicy->DecryptMemory( std::string(filename), static_cast<const BYTE*>(*data), index->data_size, *zObj) )
@ -613,9 +605,6 @@ bool CEterPack::Get(CMappedFile& out_file, const char * filename, LPCVOID * data
{ {
*data = zObj->GetBuffer(); *data = zObj->GetBuffer();
} }
#ifdef __THEMIDA__
VM_END
#endif
} }
return true; return true;
} }
@ -698,10 +687,6 @@ bool CEterPack::Get2(CMappedFile& out_file, const char * filename, TEterPackInde
} }
else if (COMPRESSED_TYPE_HYBRIDCRYPT == index->compressed_type || COMPRESSED_TYPE_HYBRIDCRYPT_WITHSDB == index->compressed_type) else if (COMPRESSED_TYPE_HYBRIDCRYPT == index->compressed_type || COMPRESSED_TYPE_HYBRIDCRYPT_WITHSDB == index->compressed_type)
{ {
#ifdef __THEMIDA__
VM_START
#endif
CLZObject * zObj = new CLZObject; CLZObject * zObj = new CLZObject;
if( !m_pCSHybridCryptPolicy->DecryptMemory( std::string(filename), static_cast<const BYTE*>(*data), index->data_size, *zObj) ) if( !m_pCSHybridCryptPolicy->DecryptMemory( std::string(filename), static_cast<const BYTE*>(*data), index->data_size, *zObj) )
@ -727,9 +712,6 @@ bool CEterPack::Get2(CMappedFile& out_file, const char * filename, TEterPackInde
{ {
*data = zObj->GetBuffer(); *data = zObj->GetBuffer();
} }
#ifdef __THEMIDA__
VM_END
#endif
} }
return true; return true;
@ -810,9 +792,6 @@ bool CEterPack::Extract()
} }
else if (COMPRESSED_TYPE_HYBRIDCRYPT == index->compressed_type || COMPRESSED_TYPE_HYBRIDCRYPT_WITHSDB == index->compressed_type) else if (COMPRESSED_TYPE_HYBRIDCRYPT == index->compressed_type || COMPRESSED_TYPE_HYBRIDCRYPT_WITHSDB == index->compressed_type)
{ {
#ifdef __THEMIDA__
VM_START
#endif
if( !m_pCSHybridCryptPolicy->DecryptMemory( std::string(index->filename), (const BYTE *) data + index->data_position, index->data_size, zObj) ) if( !m_pCSHybridCryptPolicy->DecryptMemory( std::string(index->filename), (const BYTE *) data + index->data_position, index->data_size, zObj) )
return false; return false;
@ -834,9 +813,6 @@ bool CEterPack::Extract()
writeFile.Write(zObj.GetBuffer(), zObj.GetBufferSize()); writeFile.Write(zObj.GetBuffer(), zObj.GetBufferSize());
} }
zObj.Clear(); zObj.Clear();
#ifdef __THEMIDA__
VM_END
#endif
} }
else if (COMPRESSED_TYPE_NONE == index->compressed_type) else if (COMPRESSED_TYPE_NONE == index->compressed_type)
writeFile.Write((const char *) data + index->data_position, index->data_size); writeFile.Write((const char *) data + index->data_position, index->data_size);
@ -891,9 +867,6 @@ bool CEterPack::Put(const char * filename, const char * sourceFilename, BYTE pac
if( packType == COMPRESSED_TYPE_HYBRIDCRYPT || packType == COMPRESSED_TYPE_HYBRIDCRYPT_WITHSDB ) if( packType == COMPRESSED_TYPE_HYBRIDCRYPT || packType == COMPRESSED_TYPE_HYBRIDCRYPT_WITHSDB )
{ {
#ifdef __THEMIDA__
VM_START
#endif
m_pCSHybridCryptPolicy->GenerateCryptKey( std::string(filename) ); m_pCSHybridCryptPolicy->GenerateCryptKey( std::string(filename) );
if( packType == COMPRESSED_TYPE_HYBRIDCRYPT_WITHSDB ) if( packType == COMPRESSED_TYPE_HYBRIDCRYPT_WITHSDB )
@ -903,9 +876,6 @@ bool CEterPack::Put(const char * filename, const char * sourceFilename, BYTE pac
return false; return false;
} }
} }
#ifdef __THEMIDA__
VM_END
#endif
} }
return Put(filename, pMappedData, iMappedDataSize, packType); return Put(filename, pMappedData, iMappedDataSize, packType);
@ -994,10 +964,6 @@ bool CEterPack::Put(const char * filename, LPCVOID data, long len, BYTE packType
} }
else if (packType == COMPRESSED_TYPE_HYBRIDCRYPT || packType == COMPRESSED_TYPE_HYBRIDCRYPT_WITHSDB ) else if (packType == COMPRESSED_TYPE_HYBRIDCRYPT || packType == COMPRESSED_TYPE_HYBRIDCRYPT_WITHSDB )
{ {
#ifdef __THEMIDA__
VM_START
#endif
if( !m_pCSHybridCryptPolicy->EncryptMemory( std::string(filename), (const BYTE *)data, len, zObj ) ) if( !m_pCSHybridCryptPolicy->EncryptMemory( std::string(filename), (const BYTE *)data, len, zObj ) )
{ {
return false; return false;
@ -1005,10 +971,6 @@ bool CEterPack::Put(const char * filename, LPCVOID data, long len, BYTE packType
data = zObj.GetBuffer(); data = zObj.GetBuffer();
len = zObj.GetBufferSize(); len = zObj.GetBufferSize();
#ifdef __THEMIDA__
VM_END
#endif
} }

View File

@ -115,15 +115,10 @@ class CEterPack
const std::string& GetPathName(); const std::string& GetPathName();
const char * GetDBName(); const char * GetDBName();
//THEMIDA
bool Get(CMappedFile & mappedFile, const char * filename, LPCVOID * data); bool Get(CMappedFile & mappedFile, const char * filename, LPCVOID * data);
//THEMIDA
bool Get2(CMappedFile & mappedFile, const char * filename, TEterPackIndex* index, LPCVOID * data); bool Get2(CMappedFile & mappedFile, const char * filename, TEterPackIndex* index, LPCVOID * data);
//THEMIDA
bool Put(const char * filename, const char * sourceFilename, BYTE packType, const std::string& strRelateMapName); bool Put(const char * filename, const char * sourceFilename, BYTE packType, const std::string& strRelateMapName);
//THEMIDA
bool Put(const char * filename, LPCVOID data, long len, BYTE packType); bool Put(const char * filename, LPCVOID data, long len, BYTE packType);
bool Delete(const char * filename); bool Delete(const char * filename);

View File

@ -12,11 +12,6 @@
#define PATH_ABSOLUTE_YMIRWORK1 "d:/ymir work/" #define PATH_ABSOLUTE_YMIRWORK1 "d:/ymir work/"
#define PATH_ABSOLUTE_YMIRWORK2 "d:\\ymir work\\" #define PATH_ABSOLUTE_YMIRWORK2 "d:\\ymir work\\"
#ifdef __THEMIDA__
#include <ThemidaSDK.h>
#endif
CEterPack* CEterPackManager::FindPack(const char* c_szPathName) CEterPack* CEterPackManager::FindPack(const char* c_szPathName)
{ {
std::string strFileName; std::string strFileName;

View File

@ -37,13 +37,10 @@ class CEterPackManager : public CSingleton<CEterPackManager>
void SetSearchMode(bool bPackFirst); void SetSearchMode(bool bPackFirst);
int GetSearchMode(); int GetSearchMode();
//THEMIDA
bool Get(CMappedFile & rMappedFile, const char * c_szFileName, LPCVOID * pData); bool Get(CMappedFile & rMappedFile, const char * c_szFileName, LPCVOID * pData);
//THEMIDA
bool GetFromPack(CMappedFile & rMappedFile, const char * c_szFileName, LPCVOID * pData); bool GetFromPack(CMappedFile & rMappedFile, const char * c_szFileName, LPCVOID * pData);
//THEMIDA
bool GetFromFile(CMappedFile & rMappedFile, const char * c_szFileName, LPCVOID * pData); bool GetFromFile(CMappedFile & rMappedFile, const char * c_szFileName, LPCVOID * pData);
bool isExist(const char * c_szFileName); bool isExist(const char * c_szFileName);
bool isExistInPack(const char * c_szFileName); bool isExistInPack(const char * c_szFileName);
@ -58,12 +55,9 @@ class CEterPackManager : public CSingleton<CEterPackManager>
const char * GetRootPackFileName(); const char * GetRootPackFileName();
//for hybridcrypt //for hybridcrypt
//THEMIDA
void WriteHybridCryptPackInfo(const char* pFileName); void WriteHybridCryptPackInfo(const char* pFileName);
//THEMIDA
void RetrieveHybridCryptPackKeys( const BYTE* pStream ); void RetrieveHybridCryptPackKeys( const BYTE* pStream );
//THEMIDA
void RetrieveHybridCryptPackSDB( const BYTE* pStream ); void RetrieveHybridCryptPackSDB( const BYTE* pStream );
// 메모리에 매핑된 팩들 가운데, 정리해야할 것들 정리. // 메모리에 매핑된 팩들 가운데, 정리해야할 것들 정리.

View File

@ -13,9 +13,6 @@ using namespace CryptoPP;
#define CIPHER_MODE CTR_Mode #define CIPHER_MODE CTR_Mode
#ifdef __THEMIDA__
#include <ThemidaSDK.h>
#endif
//Cipher //Cipher
//Block Size //Block Size
//Key Length //Key Length
@ -66,10 +63,6 @@ bool EterPackPolicy_CSHybridCrypt::IsContainingCryptKey() const
bool EterPackPolicy_CSHybridCrypt::GenerateCryptKey( std::string& rfileName ) bool EterPackPolicy_CSHybridCrypt::GenerateCryptKey( std::string& rfileName )
{ {
#ifdef __THEMIDA__
VM_START
#endif
//make lower & extract ext //make lower & extract ext
std::string extName = GetFileExt(rfileName); std::string extName = GetFileExt(rfileName);
stl_lowers(extName); stl_lowers(extName);
@ -97,19 +90,11 @@ bool EterPackPolicy_CSHybridCrypt::GenerateCryptKey( std::string& rfileName )
} }
m_mapHybridCryptKey[dwExtHash] = info; m_mapHybridCryptKey[dwExtHash] = info;
#ifdef __THEMIDA__
VM_END
#endif
return true; return true;
} }
bool EterPackPolicy_CSHybridCrypt::GetPerFileCryptKey( std::string& rfileName, eHybridCipherAlgorithm& eAlgorithm, TEncryptKey& key, TEncryptIV& iv ) bool EterPackPolicy_CSHybridCrypt::GetPerFileCryptKey( std::string& rfileName, eHybridCipherAlgorithm& eAlgorithm, TEncryptKey& key, TEncryptIV& iv )
{ {
#ifdef __THEMIDA__
VM_START
#endif
std::string fileNamelower = rfileName; std::string fileNamelower = rfileName;
stl_lowers(fileNamelower); stl_lowers(fileNamelower);
@ -131,8 +116,6 @@ bool EterPackPolicy_CSHybridCrypt::GetPerFileCryptKey( std::string& rfileName, e
::memcpy(key.key, cit->second.uEncryptKey.key, sizeof(key) ); ::memcpy(key.key, cit->second.uEncryptKey.key, sizeof(key) );
::memcpy(iv.iv, cit->second.uEncryptIV.iv, sizeof(iv) ); ::memcpy(iv.iv, cit->second.uEncryptIV.iv, sizeof(iv) );
//Themida Warning
for( int i = 0; i < (sizeof(key)/sizeof(dwfileNameCrc)); ++i) for( int i = 0; i < (sizeof(key)/sizeof(dwfileNameCrc)); ++i)
{ {
*((DWORD*)key.key + i) ^= dwfileNameCrc; *((DWORD*)key.key + i) ^= dwfileNameCrc;
@ -141,9 +124,6 @@ bool EterPackPolicy_CSHybridCrypt::GetPerFileCryptKey( std::string& rfileName, e
{ {
*((DWORD*)iv.iv + i) ^= dwfileNameCrc; *((DWORD*)iv.iv + i) ^= dwfileNameCrc;
} }
#ifdef __THEMIDA__
VM_END
#endif
return true; return true;
} }
@ -151,10 +131,6 @@ bool EterPackPolicy_CSHybridCrypt::GetPerFileCryptKey( std::string& rfileName, e
bool EterPackPolicy_CSHybridCrypt::EncryptMemory( std::string& rfileName, IN const BYTE* pSrcData, IN int iSrcLen, OUT CLZObject& zObj ) bool EterPackPolicy_CSHybridCrypt::EncryptMemory( std::string& rfileName, IN const BYTE* pSrcData, IN int iSrcLen, OUT CLZObject& zObj )
{ {
#ifdef __THEMIDA__
VM_START
#endif
eHybridCipherAlgorithm eAlgorithm; eHybridCipherAlgorithm eAlgorithm;
TEncryptKey key; TEncryptKey key;
TEncryptIV iv; TEncryptIV iv;
@ -207,19 +183,11 @@ bool EterPackPolicy_CSHybridCrypt::EncryptMemory( std::string& rfileName, IN con
zObj.AllocBuffer(iSrcLen); zObj.AllocBuffer(iSrcLen);
memcpy(zObj.GetBuffer(), strCipher.c_str(), strCipher.length() ); memcpy(zObj.GetBuffer(), strCipher.c_str(), strCipher.length() );
#ifdef __THEMIDA__
VM_END
#endif
return true; return true;
} }
bool EterPackPolicy_CSHybridCrypt::DecryptMemory( std::string& rfilename, IN const BYTE* pEncryptedData, IN int iEncryptedLen, OUT CLZObject& zObj ) bool EterPackPolicy_CSHybridCrypt::DecryptMemory( std::string& rfilename, IN const BYTE* pEncryptedData, IN int iEncryptedLen, OUT CLZObject& zObj )
{ {
#ifdef __THEMIDA__
VM_START
#endif
eHybridCipherAlgorithm eAlgorithm; eHybridCipherAlgorithm eAlgorithm;
TEncryptKey key; TEncryptKey key;
TEncryptIV iv; TEncryptIV iv;
@ -273,10 +241,6 @@ bool EterPackPolicy_CSHybridCrypt::DecryptMemory( std::string& rfilename, IN con
zObj.AllocBuffer(iEncryptedLen); zObj.AllocBuffer(iEncryptedLen);
memcpy(zObj.GetBuffer(), strDecipher.c_str(), strDecipher.length() ); memcpy(zObj.GetBuffer(), strDecipher.c_str(), strDecipher.length() );
#ifdef __THEMIDA__
VM_END
#endif
return true; return true;
} }
@ -336,10 +300,6 @@ int EterPackPolicy_CSHybridCrypt::ReadCryptKeyInfoFromStream( IN const BYTE* pSt
bool EterPackPolicy_CSHybridCrypt::GenerateSupplementaryDataBlock(std::string& rfilename, const std::string& strMapName, IN const BYTE* pSrcData, IN int iSrcLen, OUT LPBYTE& pDestData, OUT int& iDestLen ) bool EterPackPolicy_CSHybridCrypt::GenerateSupplementaryDataBlock(std::string& rfilename, const std::string& strMapName, IN const BYTE* pSrcData, IN int iSrcLen, OUT LPBYTE& pDestData, OUT int& iDestLen )
{ {
#ifdef __THEMIDA__
VM_START
#endif
std::string fileNamelower = rfilename; std::string fileNamelower = rfilename;
stl_lowers( fileNamelower ); stl_lowers( fileNamelower );
@ -385,19 +345,13 @@ bool EterPackPolicy_CSHybridCrypt::GenerateSupplementaryDataBlock(std::string& r
memcpy( &sdbVector[0], pDestData + iDestLen, iSDBSize ); memcpy( &sdbVector[0], pDestData + iDestLen, iSDBSize );
} }
#ifdef __THEMIDA__
VM_END
#endif
return true; return true;
} }
bool EterPackPolicy_CSHybridCrypt::GetSupplementaryDataBlock( std::string& rfilename, OUT LPBYTE& pSDB, OUT int& iSDBSize ) bool EterPackPolicy_CSHybridCrypt::GetSupplementaryDataBlock( std::string& rfilename, OUT LPBYTE& pSDB, OUT int& iSDBSize )
{ {
#ifdef __THEMIDA__
VM_START
#endif
std::string fileNamelower = rfilename; std::string fileNamelower = rfilename;
stl_lowers( fileNamelower ); stl_lowers( fileNamelower );
@ -421,9 +375,6 @@ bool EterPackPolicy_CSHybridCrypt::GetSupplementaryDataBlock( std::string& rfile
} }
pSDB = (BYTE*)&vecSDB[0]; pSDB = (BYTE*)&vecSDB[0];
#ifdef __THEMIDA__
VM_END
#endif
return true; return true;
} }
@ -468,10 +419,6 @@ void EterPackPolicy_CSHybridCrypt::WriteSupplementaryDataBlockToFile( CFileBase&
int EterPackPolicy_CSHybridCrypt::ReadSupplementatyDataBlockFromStream( IN const BYTE* pStream ) int EterPackPolicy_CSHybridCrypt::ReadSupplementatyDataBlockFromStream( IN const BYTE* pStream )
{ {
#ifdef __THEMIDA__
VM_START
#endif
//DWORD dwFileIdentifier; //DWORD dwFileIdentifier;
//std::vector<BYTE> vecSDBStream; //std::vector<BYTE> vecSDBStream;
@ -495,9 +442,5 @@ int EterPackPolicy_CSHybridCrypt::ReadSupplementatyDataBlockFromStream( IN const
m_mapSDBMap[dwFileNameHash] = info; m_mapSDBMap[dwFileNameHash] = info;
} }
#ifdef __THEMIDA__
VM_END
#endif
return iStreamOffset; return iStreamOffset;
} }

View File

@ -19,7 +19,6 @@ enum eHybridCipherAlgorithm
class CFileBase; class CFileBase;
class CLZObject; class CLZObject;
//THEMIDA
class EterPackPolicy_CSHybridCrypt class EterPackPolicy_CSHybridCrypt
{ {
public: public:

View File

@ -5,9 +5,6 @@
#include "../EterBase/tea.h" #include "../EterBase/tea.h"
#include "../EterPack/EterPackManager.h" #include "../EterPack/EterPackManager.h"
#include "Hackshield.h"
#include "WiseLogicXTrap.h"
// CHINA_CRYPT_KEY // CHINA_CRYPT_KEY
extern DWORD g_adwEncryptKey[4]; extern DWORD g_adwEncryptKey[4];
extern DWORD g_adwDecryptKey[4]; extern DWORD g_adwDecryptKey[4];
@ -282,14 +279,6 @@ bool CAccountConnector::__AuthState_RecvPhase()
} }
#else /* USE_OPENID */ #else /* USE_OPENID */
#ifdef USE_AHNLAB_HACKSHIELD
HackShield_SetUserInfo(m_strID.c_str());
#endif
#ifdef XTRAP_CLIENT_ENABLE
XTrap_SetUserInfo(m_strID.c_str(), NULL, NULL, NULL, NULL);
#endif
TPacketCGLogin3 LoginPacket; TPacketCGLogin3 LoginPacket;
LoginPacket.header = HEADER_CG_LOGIN3; LoginPacket.header = HEADER_CG_LOGIN3;

View File

@ -1,64 +0,0 @@
#include "StdAfx.h"
#if defined(CHECK_LATEST_DATA_FILES)
#include "CheckLatestFiles.h"
#include "resource.h"
static struct SCHECKFILELIST
{
LPCSTR szFileName;
DWORD dwCRC32;
ULONGLONG ullSize;
} s_astCRC32FileList[] = {
#include "CRC32_inc.h"
{ NULL, 0 }
};
static bool gs_bQuit = false;
bool CheckLatestFiles_PollEvent( void )
{
return gs_bQuit;
}
// µ¥ÀÌŸ ÆÄÀÏ CRC32 °ª °Ë»çÇϱâ
bool CheckFileCRC32( LPCSTR szFileName, DWORD dwCRC32 )
{
char szMessage[256];
if (_access( szFileName, 4 ) != 0) {
_snprintf(szMessage, sizeof(szMessage)/sizeof(szMessage[0])-1, ApplicationStringTable_GetStringz(IDS_ERR_CANNOT_READ_FILE, "ERR_CANNOT_READ_FILE"), szFileName);
ApplicationSetErrorString(szMessage);
return false;
}
DWORD dwLocalCRC32 = GetFileCRC32(szFileName);
if (dwCRC32 != dwLocalCRC32) {
_snprintf(szMessage, sizeof(szMessage)/sizeof(szMessage[0])-1, ApplicationStringTable_GetStringz(IDS_ERR_NOT_LATEST_FILE, "ERR_NOT_LATEST_FILE"), szFileName);
ApplicationSetErrorString(szMessage);
return false;
}
return true;
}
UINT CALLBACK CheckLatestFilesEntry(void * pThis)
{
::Sleep( 500 );
for( int i=0; s_astCRC32FileList[i].szFileName != NULL; i++ ) {
if (false == CheckFileCRC32(s_astCRC32FileList[i].szFileName, s_astCRC32FileList[i].dwCRC32)) {
gs_bQuit = true;
break;
}
}
return 0;
}
bool CheckLatestFiles( void )
{
unsigned int uThreadID = 0;
HANDLE hThread = (HANDLE) _beginthreadex(NULL, 0, CheckLatestFilesEntry, NULL, 0, &uThreadID);
::SetThreadPriority(hThread, THREAD_PRIORITY_LOWEST);
return true;
}
#endif

View File

@ -1,6 +0,0 @@
#pragma once
#if defined(CHECK_LATEST_DATA_FILES)
bool CheckLatestFiles( void );
bool CheckLatestFiles_PollEvent( void );
#endif

View File

@ -1,380 +0,0 @@
#include "StdAfx.h"
#include "Hackshield.h"
#ifdef USE_AHNLAB_HACKSHIELD
#if defined(LOCALE_SERVICE_EUROPE)
#define METIN2HS_MONITORING_SERVER_ADDR "79.110.88.84"
#elif
#define METIN2HS_MONITORING_SERVER_ADDR "79.110.88.84" // GF
#endif
//#define METIN2HS_MONITORING_SERVER_ADDR "119.192.130.160" //김용욱 pc
#include METIN2HS_INCLUDE_HSUPCHK
#include METIN2HS_INCLUDE_HSUSERUTIL
#include METIN2HS_INCLUDE_HSHIELD
#include METIN2HS_INCLUDE_HSHIELDLIBLINK
#define MA_MAX_PATH MAX_PATH
#define MA_T
#define MA_TCHAR char
#define MA_StringFormat snprintf
#define MA_ARRAYCOUNT sizeof
static DWORD gs_dwMainThreadID = 0;
static bool gs_isHackDetected = false;
static char gs_szHackMsg[256];
void MA_PathSplit(MA_TCHAR* src, MA_TCHAR* branch, size_t branchLen, MA_TCHAR* leaf, size_t leafLen)
{
char* p = src;
char* n = p;
while (n = strchr(p, '\\'))
p = n + 1;
if (branch)
strncpy(branch, src, p - src);
if (leaf)
strcpy(leaf, p);
}
void MA_PathMerge(MA_TCHAR* dst, size_t dstLen, MA_TCHAR* branch, MA_TCHAR* leaf)
{
snprintf(dst, dstLen, "%s\\%s", branch, leaf);
}
int __stdcall AhnHS_Callback(long lCode, long lParamSize, void* pParam)
{
switch (lCode)
{
//Engine Callback
case AHNHS_ENGINE_DETECT_GAME_HACK:
{
MA_StringFormat(gs_szHackMsg, MA_ARRAYCOUNT(gs_szHackMsg), MA_T("DETECT_GAME_HACK\n%s"), (char*)pParam);
gs_isHackDetected = true;
break;
}
//창모드 해킹툴 감지
case AHNHS_ENGINE_DETECT_WINDOWED_HACK:
{
//MA_StringFormat(gs_szHackMsg, MA_ARRAYCOUNT(gs_szHackMsg), MA_T("DETECT_WINDOWED_HACK"));
//gs_isHackDetected = true;
break;
}
//Speed 관련
case AHNHS_ACTAPC_DETECT_SPEEDHACK:
{
MA_StringFormat(gs_szHackMsg, MA_ARRAYCOUNT(gs_szHackMsg), MA_T("DETECT_SPEED_HACK"));
gs_isHackDetected = true;
break;
}
//디버깅 방지
case AHNHS_ACTAPC_DETECT_KDTRACE:
// case AHNHS_ACTAPC_DETECT_KDTRACE_CHANGED:
{
MA_StringFormat(gs_szHackMsg, MA_ARRAYCOUNT(gs_szHackMsg), MA_T("DETECT_DEBUGING(checkCode=%x)"), lCode);
gs_isHackDetected = true;
break;
}
case AHNHS_ACTAPC_DETECT_AUTOMACRO:
{
MA_StringFormat(gs_szHackMsg, MA_ARRAYCOUNT(gs_szHackMsg), MA_T("DETECT_MACRO(checkCode=%x)"), lCode);
gs_isHackDetected = true;
break;
}
// 코드 패치 감지
case AHNHS_ACTAPC_DETECT_ABNORMAL_MEMORY_ACCESS:
{
MA_StringFormat(gs_szHackMsg, MA_ARRAYCOUNT(gs_szHackMsg), MA_T("DETECT_MEMORY_ACCESS\n%s"), (char*)pParam);
gs_isHackDetected = true;
break;
}
//메모리 변조 감지.
case AHNHS_ACTAPC_DETECT_MEM_MODIFY_FROM_LMP: //임의 기준 주소 (Randomized Base Address) 확인해보기. Linker->Advanced->(/DYNAMICBASE:NO)
{
MA_StringFormat(gs_szHackMsg, MA_ARRAYCOUNT(gs_szHackMsg), MA_T("DETECT_MEMORY_MODIFY"));
gs_isHackDetected = true;
}
break;
// 핵쉴드 로컬 메모리 보호 기능이 정상적이지 않습니다.
case AHNHS_ACTAPC_DETECT_LMP_FAILED:
{
MA_StringFormat(gs_szHackMsg, MA_ARRAYCOUNT(gs_szHackMsg), MA_T("LOCAL_MEMORY_PROTECT_FAILED"));
gs_isHackDetected = true;
}
break;
//그외 해킹 방지 기능 이상
// case AHNHS_ACTAPC_DETECT_AUTOMOUSE:
case AHNHS_ACTAPC_DETECT_DRIVERFAILED:
case AHNHS_ACTAPC_DETECT_HOOKFUNCTION:
// case AHNHS_ACTAPC_DETECT_MESSAGEHOOK:
// case AHNHS_ACTAPC_DETECT_MODULE_CHANGE:
case AHNHS_ACTAPC_DETECT_ENGINEFAILED:
case AHNHS_ACTAPC_DETECT_CODEMISMATCH:
// case AHNHS_ACTAPC_DETECT_PROTECTSCREENFAILED:
{
MA_StringFormat(gs_szHackMsg, MA_ARRAYCOUNT(gs_szHackMsg), MA_T("DETECT_HACKING(checkCode = %x)\n"), lCode);
gs_isHackDetected = true;
break;
}
}
return 1;
}
bool HackShield_PollEvent()
{
return gs_isHackDetected;
//return false;
}
bool HackShield_Init()
{
MA_TCHAR szModuleDirPath[MA_MAX_PATH];
::GetCurrentDirectory(MA_ARRAYCOUNT(szModuleDirPath), szModuleDirPath);
#ifndef _DEBUG
//핵쉴드 업데이트
DWORD dwUpRet = 0;
MA_TCHAR szFullFilePath[MA_MAX_PATH];
// 핵쉴드 폴더 위치를 지정합니다.
MA_PathMerge(szFullFilePath, MA_ARRAYCOUNT(szFullFilePath), szModuleDirPath, "hshield");
AHNHS_EXT_ERRORINFO HsExtError = {0,};
// _AhnHS_HSUpdate 함수 호출
dwUpRet = _AhnHS_HSUpdateEx( szFullFilePath, // 핵쉴드 폴더 경로
1000 * 600, // 업데이트 전체 타임 아웃
METIN2HS_CODE, // 게임 코드
AHNHSUPDATE_CHKOPT_HOSTFILE| AHNHSUPDATE_CHKOPT_GAMECODE,
HsExtError,
1000* 20 ); // 서버 연결 타임아웃
// Ex 함수를 사용하실때는 반드시 HSUpSetEnv.exe 설정 툴로 env 파일에
// 게임 코드를 입력하셔야 합니다.
if ( dwUpRet != ERROR_SUCCESS)
{
// 에러 처리
switch ( dwUpRet )
{
case HSERROR_ENVFILE_NOTREAD:
MessageBox(NULL, MA_T("HACK_SHIELD_UPDATE_ERROR : HSERROR_ENVFILE_NOTREAD"), "HACK_SHIELD", MB_OK);
break;
case HSERROR_ENVFILE_NOTWRITE:
MessageBox(NULL, MA_T("HACK_SHIELD_UPDATE_ERROR : HSERROR_ENVFILE_NOTWRITE"), "HACK_SHIELD", MB_OK);
break;
case HSERROR_NETWORK_CONNECT_FAIL:
MessageBox(NULL, MA_T("HACK_SHIELD_UPDATE_ERROR : HSERROR_NETWORK_CONNECT_FAIL"), "HACK_SHIELD", MB_OK);
break;
case HSERROR_HSUPDATE_TIMEOUT:
MessageBox(NULL, MA_T("HACK_SHIELD_UPDATE_ERROR : HSERROR_HSUPDATE_TIMEOUT"), "HACK_SHIELD", MB_OK);
break;
case HSERROR_MISMATCH_ENVFILE:
MessageBox(NULL, MA_T("HACK_SHIELD_UPDATE_ERROR : HSERROR_MISMATCH_ENVFILE"), "HACK_SHIELD", MB_OK);
break;
case HSERROR_HOSTFILE_MODIFICATION:
MessageBox(NULL, MA_T("HACK_SHIELD_UPDATE_ERROR : HSERROR_HOSTFILE_MODIFICATION"), "HACK_SHIELD", MB_OK);
break;
default:
break;
}
MessageBox(NULL, MA_T("HACK_SHIELD_UPDATE_ERROR"), "HACK_SHIELD", MB_OK);
return false;
}
#endif
MA_TCHAR szInterfaceFilePath[MA_MAX_PATH];
{
if (!_AhnHSUserUtil_IsAdmin() && !_AhnHsUserUtil_IsEnableHSAdminRights())
{
DWORD dwRet = _AhnHsUserUtil_CreateUser();
switch (dwRet)
{
case HSUSERUTIL_ERR_OK: // pass
break;
case HSUSERUTIL_ERR_NOT_ADMIN: // 유저 실행을 허용하므로 에러 아님
break;
case HSUSERUTIL_ERR_NOT_NT: // 98 유저 실행을 허용하므로 에러 아님
break;
case HSUSERUTIL_ERR_DELHIDEIDINFO_FAIL:
MessageBox(NULL, MA_T("DEL_SHADOW_HIDDEN_ERROR"), "HACK_SHIELD", MB_OK);
return false;
case HSUSERUTIL_ERR_DELSHADOWACNT_FAIL:
MessageBox(NULL, MA_T("DEL_SHADOW_ACCOUNT_ERROR"), "HACK_SHIELD", MB_OK);
return false;
case HSUSERUTIL_ERR_ADDSHADOWACNT_FAIL:
MessageBox(NULL, MA_T("ADD_SHADOW_ACCOUNT_ERROR"), "HACK_SHIELD", MB_OK);
return false;
}
}
#ifdef _DEBUG
MA_PathMerge(szInterfaceFilePath, MA_ARRAYCOUNT(szInterfaceFilePath), szModuleDirPath, "hshield\\EHsvc.dll");
#else
MA_PathMerge(szInterfaceFilePath, MA_ARRAYCOUNT(szInterfaceFilePath), szModuleDirPath, "hshield\\EHsvc.dll");
#endif
}
#ifndef _DEBUG
{
AHNHS_EXT_ERRORINFO HsExtError = { 0, };
strcpy(HsExtError.szServer, METIN2HS_MONITORING_SERVER_ADDR); //모니터링 주소
strcpy(HsExtError.szGameVersion, "1.0.0.0"); //Game 버전
strcpy(HsExtError.szUserId, "Metin2User_test"); //유저 ID
DWORD dwRet = _AhnHS_StartMonitor (HsExtError, szInterfaceFilePath);
if( dwRet != ERROR_SUCCESS )
{
MessageBox(NULL, MA_T("START_MONITORING_SERVICE_ERROR"), "HACK_SHIELD", MB_OK);
}
}
#endif
{
int nRet = _AhnHS_Initialize(szInterfaceFilePath, AhnHS_Callback,
METIN2HS_CODE,
METIN2HS_LICENSE,
AHNHS_CHKOPT_SPEEDHACK
| AHNHS_CHKOPT_READWRITEPROCESSMEMORY
| AHNHS_CHKOPT_KDTRACER
// | AHNHS_CHKOPT_OPENPROCESS
| AHNHS_CHKOPT_AUTOMOUSE
| AHNHS_CHKOPT_MESSAGEHOOK
| AHNHS_CHKOPT_PROTECT_D3DX
| AHNHS_CHKOPT_LOCAL_MEMORY_PROTECTION // 코드 영역 로딩 보호
//| AHNHS_CHKOPT_ANTIFREESERVER // 프리 서버 접속 방지
| AHNHS_USE_LOG_FILE
// | AHNHS_ALLOW_SVCHOST_OPENPROCESS
//| AHNHS_ALLOW_LSASS_OPENPROCESS // 신용 카드 결제 관련
//| AHNHS_ALLOW_CSRSS_OPENPROCESS // 신용 카드 결제 관련
//| AHNHS_CHKOPT_SELF_DESTRUCTION // 강제 종료 처리: 콜백 처리 주의
| AHNHS_CHKOPT_PROCESSSCAN
| AHNHS_CHKOPT_UPDATED_FILE_CHECK
| AHNHS_CHKOPT_SEND_MONITOR_ONCE // 모니터링용: 1회만 보냄
| AHNHS_CHKOPT_SEND_MONITOR_DELAY // 모니터링용: 아이디를 천천히 보냄
| AHNHS_DONOT_TERMINATE_PROCESS, // 서버 알림
AHNHS_SPEEDHACK_SENSING_RATIO_NORMAL
);
if (nRet != HS_ERR_OK)
{
//Error 처리
switch(nRet)
{
case HS_ERR_ANOTHER_SERVICE_RUNNING:
{
MessageBox(NULL, MA_T("ANOTHER_SERVICE_RUNNING"), "HACK_SHIELD", MB_OK);
break;
}
case HS_ERR_INVALID_LICENSE:
{
MessageBox(NULL, MA_T("INVALID_LICENSE"), "HACK_SHIELD", MB_OK);
break;
}
case HS_ERR_INVALID_FILES:
{
MessageBox(NULL, MA_T("INVALID_FILES"), "HACK_SHIELD", MB_OK);
break;
}
case HS_ERR_DEBUGGER_DETECT:
{
MessageBox(NULL, MA_T("DEBUG_DETECT"), "HACK_SHIELD", MB_OK);
break;
}
case HS_ERR_NEED_ADMIN_RIGHTS:
{
MessageBox(NULL, MA_T("NEED_ADMIN_RIGHTS"), "HACK_SHIELD", MB_OK);
break;
}
case HS_ERR_COMPATIBILITY_MODE_RUNNING:
{
MessageBox(NULL, MA_T("COMPATIBILITY_MODE_RUNNING"), "HACK_SHIELD", MB_OK);
break;
}
default:
{
MA_TCHAR szMsg[255];
MA_StringFormat(szMsg, MA_ARRAYCOUNT(szMsg), MA_T("UNKNOWN_ERROR(errorCode=%x)"), nRet);
MessageBox(NULL, szMsg, "HACK_SHIELD", MB_OK);
break;
}
}
return false;
}
}
gs_dwMainThreadID = GetCurrentThreadId();
{
int nRet = _AhnHS_StartService();
assert(nRet != HS_ERR_NOT_INITIALIZED);
assert(nRet != HS_ERR_ALREADY_SERVICE_RUNNING);
if (nRet != HS_ERR_OK)
{
MA_TCHAR szMsg[255];
MA_StringFormat(szMsg, MA_ARRAYCOUNT(szMsg), MA_T("START_SERVICE_ERROR(errorCode=%x)"), nRet);
MessageBox(NULL, szMsg, "HACK_SHIELD", MB_OK);
return false;
}
}
return true;
}
bool HackShield_Shutdown()
{
if (gs_dwMainThreadID)
{
gs_dwMainThreadID = 0;
_AhnHS_StopService();
}
int nRet = _AhnHS_Uninitialize();
if (nRet != HS_ERR_OK)
{
MA_TCHAR szMsg[255];
MA_StringFormat(szMsg, MA_ARRAYCOUNT(szMsg), MA_T("UNINITIALIZE_ERROR(errorCode=%x)"), nRet);
MessageBox(NULL, szMsg, "HACK_SHIELD", MB_OK);
}
if (_AhnHsUserUtil_CheckHSShadowAccount())
{
_AhnHsUserUtil_DeleteUser();
}
if (gs_isHackDetected)
{
MessageBox(NULL, gs_szHackMsg, "HACK_SHIELD", MB_OK);
}
return true;
}
#define PREFIX_LOCALE "locale/"
void HackShield_SetUserInfo(const char* szAccountName)
{
MA_TCHAR szUserInfo[256];
const char* szLocaleName = LocaleService_IsYMIR() ? MA_T("unknown") : LocaleService_GetLocalePath();
if( strncmp( szLocaleName, PREFIX_LOCALE, strlen(PREFIX_LOCALE) ) == 0 )
szLocaleName += strlen(PREFIX_LOCALE);
MA_StringFormat(szUserInfo, MA_ARRAYCOUNT(szUserInfo), MA_T("%s / %s"), szAccountName, szLocaleName );
_AhnHS_SetUserId(szUserInfo);
}
#endif /* USE_AHNLAB_HACKSHIELD */

View File

@ -1,23 +0,0 @@
#pragma once
#ifdef USE_AHNLAB_HACKSHIELD
#include "HackshieldLicense.h"
#ifndef METIN2HS_INCLUDE
//#define METIN2HS_INCLUDE hshield-5.4.8.1
#define METIN2HS_INCLUDE hackshield //2012³â 3¿ù
#endif
#define METIN2HS_INCLUDE_HSUPCHK <METIN2HS_INCLUDE/hsupchk.h>
#define METIN2HS_INCLUDE_HSUSERUTIL <METIN2HS_INCLUDE/hsuserutil.h>
#define METIN2HS_INCLUDE_HSHIELD <METIN2HS_INCLUDE/hshield.h>
#define METIN2HS_INCLUDE_HSHIELDLIBLINK <METIN2HS_INCLUDE/hshieldLibLink.h>
#define METIN2HS_INCLUDE_ANTICPXSVR <METIN2HS_INCLUDE/AntiCpXSvr.h>
bool HackShield_Init();
bool HackShield_Shutdown();
bool HackShield_PollEvent();
void HackShield_SetUserInfo(const char* szAccountName);
#endif /* USE_AHNLAB_HACKSHIELD */

View File

@ -1,5 +0,0 @@
#pragma once
#define METIN2HS_EXE_FILE_NAME "metin2.bin"
#define METIN2HS_CODE 5858
#define METIN2HS_LICENSE "2A126BBDC6C61351124B2872"

View File

@ -1,5 +0,0 @@
#pragma once
#define METIN2HS_EXE_FILE_NAME "metin2client.bin"
#define METIN2HS_CODE 5857
#define METIN2HS_LICENSE "B1FECACB51BD40B919EFCDB9"

View File

@ -1,7 +1,5 @@
#define LOCALE_SERVICE_BRAZIL // 브라질 #define LOCALE_SERVICE_BRAZIL // 브라질
#define XTRAP_CLIENT_ENABLE
#define XTRAP_PATCH_ARG "660970B4483BDC32C5266D9844CFED6230832A3E2F95F8DD45DB9AED6AE8B837900845956432BD8F2D14136A8CF8BD970A93B783971789382A493B68C5C2BA650F7D04245246E41FB1670C4E955F790A585C3F5D8EB0BADD81C6DD2DB7"
#define ENABLE_COSTUME_SYSTEM #define ENABLE_COSTUME_SYSTEM
#define ENABLE_ENERGY_SYSTEM #define ENABLE_ENERGY_SYSTEM
#define ENABLE_DRAGON_SOUL_SYSTEM #define ENABLE_DRAGON_SOUL_SYSTEM

View File

@ -1,6 +1,4 @@
#define LOCALE_SERVICE_CANADA // 캐나다 #define LOCALE_SERVICE_CANADA // 캐나다
#define XTRAP_CLIENT_ENABLE
#define XTRAP_PATCH_ARG "660970B4953BDCCFC5266D9844CFED62D9D88487BAFA5824E622544D919AC5C535B7B5BB27DF7189499DA1EFA3745A052BE7AE8B12275EDE90BAFDD333407BF80F7D04245246E40AF7650C4AD8583917B21AD7B2AFDE3D4F588C800D128456E1DFEC"
#define ENABLE_COSTUME_SYSTEM #define ENABLE_COSTUME_SYSTEM
#define ENABLE_ENERGY_SYSTEM #define ENABLE_ENERGY_SYSTEM

View File

@ -1,5 +1,3 @@
#define LOCALE_SERVICE_EUROPE // 유럽 #define LOCALE_SERVICE_EUROPE // 유럽
#define LSS_SECURITY_KEY "1234abcd5678efgh" #define LSS_SECURITY_KEY "1234abcd5678efgh"
#define CHECK_LATEST_DATA_FILES

View File

@ -1,9 +1,5 @@
#define LOCALE_SERVICE_EUROPE // 유럽 #define LOCALE_SERVICE_EUROPE // 유럽
//#define USE_AHNLAB_HACKSHIELD
//#define CHECK_LATEST_DATA_FILES
#define LSS_SECURITY_KEY "1234abcd5678efgh" #define LSS_SECURITY_KEY "1234abcd5678efgh"
#define ENABLE_COSTUME_SYSTEM #define ENABLE_COSTUME_SYSTEM

View File

@ -3,11 +3,6 @@
#define LSS_SECURITY_KEY "1234abcd5678efgh" #define LSS_SECURITY_KEY "1234abcd5678efgh"
#define CHECK_LATEST_DATA_FILES
#define XTRAP_CLIENT_ENABLE
#define XTRAP_PATCH_ARG "660970B45839DC81C5456D9844CFED62303A1E1A50FFCBE4EA66A304B961F2C32CE50A020A6641FABDF1012DCA07BBC05387C8AD0D4781097428789FE68B54150F7D04245246E404A17B4351DC553907911A3FD51AEE1C697A03BC66B3A378"
#define ENABLE_COSTUME_SYSTEM #define ENABLE_COSTUME_SYSTEM
#define ENABLE_ENERGY_SYSTEM #define ENABLE_ENERGY_SYSTEM
#define USE_OPENID #define USE_OPENID

View File

@ -1,8 +1,5 @@
#include "Locale_inc_EU.h" #include "Locale_inc_EU.h"
//#define XTRAP_CLIENT_ENABLE
#define XTRAP_PATCH_ARG "660970B47839DCBFC5206D9844CFED627251D23A44458651BD1F0E57E26D7C85B4CC00C30B1D1724026D5F65A662992141DB6C233A24040C5A6BCD6D25A5576D0F7D04245246E417A4610E56955D721985C1414D9E254947FC"
#define ENABLE_COSTUME_SYSTEM #define ENABLE_COSTUME_SYSTEM
#define ENABLE_ENERGY_SYSTEM #define ENABLE_ENERGY_SYSTEM
#define ENABLE_DRAGON_SOUL_SYSTEM #define ENABLE_DRAGON_SOUL_SYSTEM

View File

@ -1,8 +1,5 @@
#include "Locale_inc_EU.h" #include "Locale_inc_EU.h"
//#define XTRAP_CLIENT_ENABLE
//#define XTRAP_PATCH_ARG "660970B47839DCBFC5206D9844CFED627251D23A44458651BD1F0E57E26D7C85B4CC00C30B1D1724026D5F65A662992141DB6C233A24040C5A6BCD6D25A5576D0F7D04245246E417A4610E56955D721985C1414D9E254947FC"
#define ENABLE_COSTUME_SYSTEM #define ENABLE_COSTUME_SYSTEM
#define ENABLE_ENERGY_SYSTEM #define ENABLE_ENERGY_SYSTEM
#define ENABLE_DRAGON_SOUL_SYSTEM #define ENABLE_DRAGON_SOUL_SYSTEM

View File

@ -1,261 +0,0 @@
#include "StdAfx.h"
#include "NProtectGameGuard.h"
#ifdef USE_NPROTECT_GAMEGUARD
static struct GameGuard
{
bool isInitError;
bool isProcError;
unsigned msg;
unsigned arg;
} gs_gameGuard = {
false, 0, 0,
};
#ifdef LOCALE_SERVICE_HONGKONG
#include "NProtect/NPGameLibHK.h"
#pragma comment(lib, "NPGameLibHK_MT.lib")
CNPGameLib npgl("Metin2HK");
#endif
#ifdef LOCALE_SERVICE_TAIWAN
#include "NProtect/NPGameLibTW.h"
#pragma comment(lib, "NPGameLibTW_MT.lib")
CNPGameLib npgl("Metin2TW");
#endif
#ifdef LOCALE_SERVICE_EUROPE
#include "NProtect/NPGameLibEU.h"
#pragma comment(lib, "NPGameLibEU_MT.lib")
CNPGameLib npgl("Metin2EU");
#endif
BOOL CALLBACK NPGameMonCallback(DWORD msg, DWORD arg)
{
switch (msg)
{
case NPGAMEMON_COMM_ERROR:
case NPGAMEMON_COMM_CLOSE:
case NPGAMEMON_INIT_ERROR:
case NPGAMEMON_SPEEDHACK:
case NPGAMEMON_GAMEHACK_KILLED:
case NPGAMEMON_GAMEHACK_DETECT:
case NPGAMEMON_GAMEHACK_DOUBT:
gs_gameGuard.msg = msg;
gs_gameGuard.arg = arg;
gs_gameGuard.isProcError = true;
return false;
break;
}
return true;
}
bool LocaleService_IsGameGuardError()
{
return gs_gameGuard.isProcError;
}
bool LocaleService_InitGameGuard()
{
unsigned result = npgl.Init();
if (NPGAMEMON_SUCCESS != result)
{
gs_gameGuard.isInitError = true;
gs_gameGuard.msg = result;
return false;
}
return true;
}
bool LocaleService_RunGameGuard(HWND hWnd)
{
npgl.SetHwnd(hWnd);
return true;
}
void LocaleService_NoticeGameGuardInitError_HongKong()
{
char msg[256];
switch (gs_gameGuard.msg)
{
case NPGAMEMON_ERROR_EXIST:
sprintf(msg, "GameGuard執?中。稍等??或是?新啟動之後再執?。 ");
break;
case NPGAMEMON_ERROR_GAME_EXIST:
sprintf(msg, "遊戲?複執?或GameGuard已在執?中。結?遊戲後請?新執?。 ");
break;
case NPGAMEMON_ERROR_INIT:
sprintf(msg, "GameGuard初期化錯?。?新啟動後再執?或是關閉可??發生衝突的?式之後再執?。 ");
break;
case NPGAMEMON_ERROR_AUTH_GAMEGUARD:
case NPGAMEMON_ERROR_NFOUND_GG:
case NPGAMEMON_ERROR_AUTH_INI:
case NPGAMEMON_ERROR_NFOUND_INI:
sprintf(msg, "無GameGuard檔?或產生異變。請安裝GameGuard 的安裝檔。 ");
break;
case NPGAMEMON_ERROR_CRYPTOAPI:
sprintf(msg, "Window的某部份系統檔?受損。請?新安裝IE。 ");
break;
case NPGAMEMON_ERROR_EXECUTE:
sprintf(msg, "GameGuard執?失敗。請?新執?GameGuard安裝檔。 ");
break;
case NPGAMEMON_ERROR_ILLEGAL_PRG:
sprintf(msg, "發?非法?式。請結?不需要的?式之後?新執?。 ");
break;
case NPGMUP_ERROR_ABORT:
sprintf(msg, "GameGuard升?取?。如果?直無法連線,請?調整網路或?人的防火牆?定。 ");
break;
case NPGMUP_ERROR_CONNECT:
case NPGMUP_ERROR_DOWNCFG:
sprintf(msg, "GameGuard改版(升?)?服連線失敗。稍等之後再?新執?或是如果有?人防火牆的話請調整?人防火牆?定之後再試。 ");
break;
case NPGMUP_ERROR_AUTH:
sprintf(msg, "GameGuard改版沒?完成。請?停止執?防毒?式後再?新執?或是使用PC管理?式調整?定後再執?。 ");
break;
case NPGAMEMON_ERROR_NPSCAN:
sprintf(msg, "病毒及登入駭客入侵工具檢查模組失敗。可?是記憶體不足或是感染了病毒。 ");
break;
default:
sprintf(msg, "GameGuard執??發?錯?。請將遊戲資?夾裡的GameGuard資?夾中的*.erl檔?隨電子郵件??寄到game2@inca.co.kr信箱。 ");
break;
}
MessageBox(NULL, msg, "GameGuard 錯?", MB_OK);
}
void LocaleService_NoticeGameGuardInitError_International()
{
char msg[256];
switch (gs_gameGuard.msg)
{
case NPGAMEMON_ERROR_EXIST:
sprintf(msg, "GameGuard is already running.\nPlease reboot and restart the game.");
break;
case NPGAMEMON_ERROR_GAME_EXIST:
sprintf(msg, "GameGuard is already running.\nPlease restart the game.");
break;
case NPGAMEMON_ERROR_INIT:
sprintf(msg, "GameGuard has initial error.\nPlease kill other conflict programs and restart game.");
break;
case NPGAMEMON_ERROR_AUTH_GAMEGUARD:
case NPGAMEMON_ERROR_NFOUND_GG:
case NPGAMEMON_ERROR_AUTH_INI:
case NPGAMEMON_ERROR_NFOUND_INI:
sprintf(msg, "GameGuard files are modified or deleted.\nPlease reinstall GameGuard.");
break;
case NPGAMEMON_ERROR_CRYPTOAPI:
sprintf(msg, "GameGuard detects Windows system file error.\nPlease reinstall Internet Explorer(IE)");
break;
case NPGAMEMON_ERROR_EXECUTE:
sprintf(msg, "GameGuard running is failed.\nPlease reinstall GameGuard.");
break;
case NPGAMEMON_ERROR_ILLEGAL_PRG:
sprintf(msg, "GameGuard detects Illegal Program.\nPlease kill other programs not needs and restart game");
break;
case NPGMUP_ERROR_ABORT:
sprintf(msg, "GameGuard update was canceled.\nWhen not connect, change the internal or private firewall settings");
break;
case NPGMUP_ERROR_CONNECT:
sprintf(msg, "GameGuard hooking is failed.\nPlease download newer anti-virus and check all system.");
break;
case NPGAMEMON_ERROR_GAMEGUARD:
sprintf(msg, "GameGuard has initial error or old game guard.\nPlease reinstall GameGuard");
break;
case NPGMUP_ERROR_PARAM:
sprintf(msg, "GameGuard detects .ini file is modified.\nPlease reinstall GameGuard");
break;
case NPGMUP_ERROR_INIT:
sprintf(msg, "GameGuard detects npgmup.des initial error.\nPlease delete GameGuard Folder and reinstall GameGuard");
break;
case NPGMUP_ERROR_DOWNCFG:
sprintf(msg, "GameGuard update server connection is failed.\nPlease restart or check private firewall settings.");
break;
case NPGMUP_ERROR_AUTH:
sprintf(msg, "GameGuard update is not completed.\nPlease pause anti-virus and restart game.");
break;
case NPGAMEMON_ERROR_NPSCAN:
sprintf(msg, "GameGuard virus-hacking checker loading is failed\nPlease check memory lack or virus.");
break;
default:
sprintf(msg, "UnknownErrorCode: %d\nPlease send a letter that has *.erl in game folder to Game1@inca.co.kr", gs_gameGuard.msg);
break;
}
MessageBox(NULL, msg, "GameGuard Initiail Error", MB_OK);
}
void LocaleService_NoticeGameGuardProcError_HongKong()
{
char msg[256];
switch (gs_gameGuard.msg)
{
case NPGAMEMON_COMM_ERROR:
case NPGAMEMON_COMM_CLOSE:
return;
case NPGAMEMON_INIT_ERROR:
sprintf(msg, "GameGuard初期化錯? : %lu", gs_gameGuard.arg);
break;
case NPGAMEMON_SPEEDHACK:
sprintf(msg, "發?speed hack。 ");
break;
case NPGAMEMON_GAMEHACK_KILLED:
sprintf(msg, "發?遊戲hack。 ");
break;
case NPGAMEMON_GAMEHACK_DETECT:
sprintf(msg, "發?遊戲hack。 ");
break;
case NPGAMEMON_GAMEHACK_DOUBT:
sprintf(msg, "遊戲或GameGuard已變?。 ");
break;
}
MessageBox(NULL, msg, "GameGuard Error", MB_OK);
}
void LocaleService_NoticeGameGuardProcError_International()
{
char msg[256];
switch (gs_gameGuard.msg)
{
case NPGAMEMON_COMM_ERROR:
case NPGAMEMON_COMM_CLOSE:
break;
case NPGAMEMON_INIT_ERROR:
wsprintf(msg, "GameGuard has initial error : %lu", gs_gameGuard.arg);
break;
case NPGAMEMON_SPEEDHACK:
wsprintf(msg, "GameGuard detects SpeedHack");
break;
case NPGAMEMON_GAMEHACK_KILLED:
wsprintf(msg, "GameGuard detects GameHack\r\n%s", npgl.GetInfo());
break;
case NPGAMEMON_GAMEHACK_DETECT:
wsprintf(msg, "GameGuard detects GameHack\r\n%s", npgl.GetInfo());
break;
case NPGAMEMON_GAMEHACK_DOUBT:
wsprintf(msg, "Game or Gamguard was modified.");
break;
}
MessageBox(NULL, msg, "GameGuard Error", MB_OK);
}
void LocaleService_NoticeGameGuardMessasge()
{
if (gs_gameGuard.isInitError)
{
if (LocaleService_IsHONGKONG())
LocaleService_NoticeGameGuardInitError_HongKong();
else
LocaleService_NoticeGameGuardInitError_International();
}
else if (gs_gameGuard.isProcError)
{
if (LocaleService_IsHONGKONG())
LocaleService_NoticeGameGuardProcError_HongKong();
else
LocaleService_NoticeGameGuardProcError_International();
}
}
#endif /* USE_NPROTECT_GAMEGUARD */

View File

@ -1,10 +0,0 @@
#pragma once
#ifdef USE_NPROTECT_GAMEGUARD
bool GameGuard_Init();
bool GameGuard_IsError();
bool GameGuard_Run(HWND hWnd);
void GameGuard_NoticeMessage();
#endif /* USE_NPROTECT_GAMEGUARD */

View File

@ -12,11 +12,6 @@
#include "ProcessScanner.h" #include "ProcessScanner.h"
#include "HackShield.h"
#include "NProtectGameGuard.h"
#include "WiseLogicXTrap.h"
#include "CheckLatestFiles.h"
extern void GrannyCreateSharedDeformBuffer(); extern void GrannyCreateSharedDeformBuffer();
extern void GrannyDestroySharedDeformBuffer(); extern void GrannyDestroySharedDeformBuffer();
@ -398,17 +393,6 @@ void CPythonApplication::SkipRenderBuffering(DWORD dwSleepMSec)
bool CPythonApplication::Process() bool CPythonApplication::Process()
{ {
#if defined(CHECK_LATEST_DATA_FILES)
if (CheckLatestFiles_PollEvent())
return false;
#endif
#ifdef USE_AHNLAB_HACKSHIELD
if (HackShield_PollEvent())
return false;
#endif
#ifdef XTRAP_CLIENT_ENABLE
XTrap_PollEvent();
#endif
ELTimer_SetFrameMSec(); ELTimer_SetFrameMSec();
// m_Profiler.Clear(); // m_Profiler.Clear();
@ -460,11 +444,6 @@ bool CPythonApplication::Process()
m_kGuildMarkUploader.Process(); m_kGuildMarkUploader.Process();
#ifdef USE_NPROTECT_GAMEGUARD
if (GameGuard_IsError())
return false;
#endif
m_kGuildMarkDownloader.Process(); m_kGuildMarkDownloader.Process();
m_kAccountConnector.Process(); m_kAccountConnector.Process();
@ -1113,15 +1092,6 @@ bool CPythonApplication::Create(PyObject * poSelf, const char * c_szName, int wi
return false; return false;
} }
#ifdef USE_NPROTECT_GAMEGUARD
if (!GameGuard_Run(CMSWindow::GetWindowHandle()))
return false;
#endif
#ifdef XTRAP_CLIENT_ENABLE
if (!XTrap_CheckInit())
return false;
#endif
if (m_pySystem.IsUseDefaultIME()) if (m_pySystem.IsUseDefaultIME())
{ {
CPythonIME::Instance().UseDefaultIME(); CPythonIME::Instance().UseDefaultIME();

View File

@ -3,12 +3,6 @@
#include "PythonApplication.h" #include "PythonApplication.h"
#include "Packet.h" #include "Packet.h"
#include "../eterpack/EterPackManager.h" #include "../eterpack/EterPackManager.h"
#include "Hackshield.h"
#include "WiseLogicXTrap.h"
#ifdef USE_AHNLAB_HACKSHIELD
#include METIN2HS_INCLUDE_HSHIELD
#endif
// HandShake --------------------------------------------------------------------------- // HandShake ---------------------------------------------------------------------------
void CPythonNetworkStream::HandShakePhase() void CPythonNetworkStream::HandShakePhase()
@ -202,33 +196,7 @@ bool CPythonNetworkStream::RecvHSCheckRequest()
return false; return false;
} }
#if defined(USE_AHNLAB_HACKSHIELD) || defined(LOCALE_SERVICE_GLOBAL)
TPacketHSCheck pack_ret;
memset(&pack_ret, 0, sizeof(pack_ret));
pack_ret.bHeader = HEADER_CG_HS_ACK;
#if defined(USE_AHNLAB_HACKSHIELD)
unsigned long ret = _AhnHS_MakeResponse( packet.Req.byBuffer, packet.Req.nLength, &pack_ret.Req );
if (ERROR_SUCCESS != ret)
{
TraceError("HShield: _AhnHS_MakeResponse return error(%u)", ret);
return false; return false;
}
#endif
if (!Send(sizeof(pack_ret), &pack_ret))
{
TraceError("HShield: Send failed");
return false;
}
return true;
#else
return false;
#endif
} }
bool CPythonNetworkStream::RecvXTrapVerifyRequest() bool CPythonNetworkStream::RecvXTrapVerifyRequest()
@ -245,8 +213,6 @@ bool CPythonNetworkStream::RecvXTrapVerifyRequest()
TPacketXTrapCSVerify packet_res; TPacketXTrapCSVerify packet_res;
packet_res.bHeader = HEADER_CG_XTRAP_ACK; packet_res.bHeader = HEADER_CG_XTRAP_ACK;
XTrap_ValidateCheckStream( packet.bPacketData, packet_res.bPacketData );
if (!Send(sizeof(packet_res), &packet_res)) if (!Send(sizeof(packet_res), &packet_res))
{ {
TraceError("XTrap: Send failed"); TraceError("XTrap: Send failed");

View File

@ -4,9 +4,6 @@
#include "Test.h" #include "Test.h"
#include "AccountConnector.h" #include "AccountConnector.h"
#include "Hackshield.h"
#include "WiseLogicXTrap.h"
// Login --------------------------------------------------------------------------- // Login ---------------------------------------------------------------------------
void CPythonNetworkStream::LoginPhase() void CPythonNetworkStream::LoginPhase()
{ {

View File

@ -14,12 +14,6 @@
#include "../CWebBrowser/CWebBrowser.h" #include "../CWebBrowser/CWebBrowser.h"
#include "../eterBase/CPostIt.h" #include "../eterBase/CPostIt.h"
#include "CheckLatestFiles.h"
#include "Hackshield.h"
#include "NProtectGameGuard.h"
#include "WiseLogicXTrap.h"
extern "C" { extern "C" {
extern int _fltused; extern int _fltused;
volatile int _AVOID_FLOATING_POINT_LIBRARY_BUG = _fltused; volatile int _AVOID_FLOATING_POINT_LIBRARY_BUG = _fltused;
@ -388,10 +382,6 @@ bool RunMainScript(CPythonLauncher& pyLauncher, const char* lpCmdLine)
if (stVec.size() != 0 && "--pause-before-create-window" == stVec[0]) if (stVec.size() != 0 && "--pause-before-create-window" == stVec[0])
{ {
#ifdef XTRAP_CLIENT_ENABLE
if (!XTrap_CheckInit())
return false;
#endif
system("pause"); system("pause");
} }
if (!pyLauncher.RunFile("system.py")) if (!pyLauncher.RunFile("system.py"))
@ -574,26 +564,6 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
LocaleService_LoadConfig("locale.cfg"); LocaleService_LoadConfig("locale.cfg");
SetDefaultCodePage(LocaleService_GetCodePage()); SetDefaultCodePage(LocaleService_GetCodePage());
#ifdef XTRAP_CLIENT_ENABLE
if (!XTrap_Init())
return 0;
#endif
#ifdef USE_AHNLAB_HACKSHIELD
if (!HackShield_Init())
return 0;
#endif
#ifdef USE_NPROTECT_GAMEGUARD
if (!GameGuard_Init())
return 0;
#endif
#if defined(CHECK_LATEST_DATA_FILES)
if (!CheckLatestFiles())
return 0;
#endif
bool bQuit = false; bool bQuit = false;
bool bAuthKeyChecked = false; //OpenID 버전에서 인증키가 들어왔는지 알기 위한 인자. bool bAuthKeyChecked = false; //OpenID 버전에서 인증키가 들어왔는지 알기 위한 인자.
int nArgc = 0; int nArgc = 0;
@ -717,10 +687,6 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
Main(hInstance, lpCmdLine); Main(hInstance, lpCmdLine);
#ifdef USE_NPROTECT_GAMEGUARD
GameGuard_NoticeMessage();
#endif
WebBrowser_Cleanup(); WebBrowser_Cleanup();
::CoUninitialize(); ::CoUninitialize();
@ -729,9 +695,6 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
MessageBox(NULL, gs_szErrorString, ApplicationStringTable_GetStringz(IDS_APP_NAME, "APP_NAME"), MB_ICONSTOP); MessageBox(NULL, gs_szErrorString, ApplicationStringTable_GetStringz(IDS_APP_NAME, "APP_NAME"), MB_ICONSTOP);
Clean: Clean:
#ifdef USE_AHNLAB_HACKSHIELD
HackShield_Shutdown();
#endif
SAFE_FREE_GLOBAL(szArgv); SAFE_FREE_GLOBAL(szArgv);
return 0; return 0;

View File

@ -315,11 +315,9 @@
<ClCompile Include="AccountConnector.cpp" /> <ClCompile Include="AccountConnector.cpp" />
<ClCompile Include="AffectFlagContainer.cpp" /> <ClCompile Include="AffectFlagContainer.cpp" />
<ClCompile Include="CameraProcedure.cpp" /> <ClCompile Include="CameraProcedure.cpp" />
<ClCompile Include="CheckLatestFiles.cpp" />
<ClCompile Include="GameType.cpp" /> <ClCompile Include="GameType.cpp" />
<ClCompile Include="GuildMarkDownloader.cpp" /> <ClCompile Include="GuildMarkDownloader.cpp" />
<ClCompile Include="GuildMarkUploader.cpp" /> <ClCompile Include="GuildMarkUploader.cpp" />
<ClCompile Include="Hackshield.cpp" />
<ClCompile Include="InstanceBase.cpp" /> <ClCompile Include="InstanceBase.cpp" />
<ClCompile Include="InstanceBaseBattle.cpp" /> <ClCompile Include="InstanceBaseBattle.cpp" />
<ClCompile Include="InstanceBaseEffect.cpp" /> <ClCompile Include="InstanceBaseEffect.cpp" />
@ -333,7 +331,6 @@
<ClCompile Include="MarkManager.cpp" /> <ClCompile Include="MarkManager.cpp" />
<ClCompile Include="MovieMan.cpp" /> <ClCompile Include="MovieMan.cpp" />
<ClCompile Include="NetworkActorManager.cpp" /> <ClCompile Include="NetworkActorManager.cpp" />
<ClCompile Include="NProtectGameGuard.cpp" />
<ClCompile Include="ProcessCRC.cpp" /> <ClCompile Include="ProcessCRC.cpp" />
<ClCompile Include="ProcessScanner.cpp" /> <ClCompile Include="ProcessScanner.cpp" />
<ClCompile Include="PythonApplication.cpp" /> <ClCompile Include="PythonApplication.cpp" />
@ -410,7 +407,6 @@
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='VTune|Win32'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='VTune|Win32'">Create</PrecompiledHeader>
</ClCompile> </ClCompile>
<ClCompile Include="UserInterface.cpp" /> <ClCompile Include="UserInterface.cpp" />
<ClCompile Include="WiseLogicXTrap.cpp" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="AbstractApplication.h" /> <ClInclude Include="AbstractApplication.h" />
@ -420,15 +416,9 @@
<ClInclude Include="AbstractSingleton.h" /> <ClInclude Include="AbstractSingleton.h" />
<ClInclude Include="AccountConnector.h" /> <ClInclude Include="AccountConnector.h" />
<ClInclude Include="AffectFlagContainer.h" /> <ClInclude Include="AffectFlagContainer.h" />
<ClInclude Include="CheckLatestFiles.h" />
<ClInclude Include="CRC32_inc.h" />
<ClInclude Include="GameType.h" /> <ClInclude Include="GameType.h" />
<ClInclude Include="GuildMarkDownloader.h" /> <ClInclude Include="GuildMarkDownloader.h" />
<ClInclude Include="GuildMarkUploader.h" /> <ClInclude Include="GuildMarkUploader.h" />
<ClInclude Include="Hackshield.h" />
<ClInclude Include="HackshieldLicense.h" />
<ClInclude Include="HackshieldLicense_metin2.h" />
<ClInclude Include="HackshieldLicense_metin2client.h" />
<ClInclude Include="InstanceBase.h" /> <ClInclude Include="InstanceBase.h" />
<ClInclude Include="InsultChecker.h" /> <ClInclude Include="InsultChecker.h" />
<ClInclude Include="Locale.h" /> <ClInclude Include="Locale.h" />
@ -450,7 +440,6 @@
<ClInclude Include="MarkManager.h" /> <ClInclude Include="MarkManager.h" />
<ClInclude Include="MovieMan.h" /> <ClInclude Include="MovieMan.h" />
<ClInclude Include="NetworkActorManager.h" /> <ClInclude Include="NetworkActorManager.h" />
<ClInclude Include="NProtectGameGuard.h" />
<ClInclude Include="Packet.h" /> <ClInclude Include="Packet.h" />
<ClInclude Include="ProcessCRC.h" /> <ClInclude Include="ProcessCRC.h" />
<ClInclude Include="ProcessScanner.h" /> <ClInclude Include="ProcessScanner.h" />
@ -481,7 +470,6 @@
<ClInclude Include="ServerStateChecker.h" /> <ClInclude Include="ServerStateChecker.h" />
<ClInclude Include="StdAfx.h" /> <ClInclude Include="StdAfx.h" />
<ClInclude Include="Test.h" /> <ClInclude Include="Test.h" />
<ClInclude Include="WiseLogicXTrap.h" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="..\..\bin_original\colorInfo.py" /> <None Include="..\..\bin_original\colorInfo.py" />

View File

@ -38,9 +38,6 @@
<Filter Include="Network"> <Filter Include="Network">
<UniqueIdentifier>{9f4f7fe3-b9af-4b7c-8b0b-43dadd7f4a37}</UniqueIdentifier> <UniqueIdentifier>{9f4f7fe3-b9af-4b7c-8b0b-43dadd7f4a37}</UniqueIdentifier>
</Filter> </Filter>
<Filter Include="Security">
<UniqueIdentifier>{60b2fc54-3c61-4113-b664-e7ad8059d970}</UniqueIdentifier>
</Filter>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="AffectFlagContainer.cpp"> <ClCompile Include="AffectFlagContainer.cpp">
@ -301,18 +298,6 @@
<ClCompile Include="ServerStateCheckerModule.cpp"> <ClCompile Include="ServerStateCheckerModule.cpp">
<Filter>Network</Filter> <Filter>Network</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="CheckLatestFiles.cpp">
<Filter>Security</Filter>
</ClCompile>
<ClCompile Include="Hackshield.cpp">
<Filter>Security</Filter>
</ClCompile>
<ClCompile Include="NProtectGameGuard.cpp">
<Filter>Security</Filter>
</ClCompile>
<ClCompile Include="WiseLogicXTrap.cpp">
<Filter>Security</Filter>
</ClCompile>
<ClCompile Include="GameType.cpp" /> <ClCompile Include="GameType.cpp" />
<ClCompile Include="MovieMan.cpp" /> <ClCompile Include="MovieMan.cpp" />
<ClCompile Include="StdAfx.cpp" /> <ClCompile Include="StdAfx.cpp" />
@ -490,30 +475,6 @@
<ClInclude Include="ServerStateChecker.h"> <ClInclude Include="ServerStateChecker.h">
<Filter>Network</Filter> <Filter>Network</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="CheckLatestFiles.h">
<Filter>Security</Filter>
</ClInclude>
<ClInclude Include="CRC32_inc.h">
<Filter>Security</Filter>
</ClInclude>
<ClInclude Include="Hackshield.h">
<Filter>Security</Filter>
</ClInclude>
<ClInclude Include="HackshieldLicense.h">
<Filter>Security</Filter>
</ClInclude>
<ClInclude Include="HackshieldLicense_metin2.h">
<Filter>Security</Filter>
</ClInclude>
<ClInclude Include="HackshieldLicense_metin2client.h">
<Filter>Security</Filter>
</ClInclude>
<ClInclude Include="NProtectGameGuard.h">
<Filter>Security</Filter>
</ClInclude>
<ClInclude Include="WiseLogicXTrap.h">
<Filter>Security</Filter>
</ClInclude>
<ClInclude Include="GameType.h" /> <ClInclude Include="GameType.h" />
<ClInclude Include="MovieMan.h" /> <ClInclude Include="MovieMan.h" />
<ClInclude Include="StdAfx.h" /> <ClInclude Include="StdAfx.h" />

View File

@ -1,81 +0,0 @@
#include "StdAfx.h"
#include "Locale.h"
#include "WiseLogicXTrap.h"
#ifdef XTRAP_CLIENT_ENABLE
#include "urlmon.h"
#pragma comment(lib, "urlmon")
#pragma comment(lib, "wininet")
#include <XTrap/Xtrap_C_Interface.h>
#pragma comment(lib, "XTrap4Client_mt.lib")
#pragma comment(lib, "XTrap4Client_ClientPart_mt.lib")
#pragma comment(lib, "XTrap4Client_ServerPart_mt.lib")
#pragma comment(lib, "XTrap_Unipher_mt.lib")
//#pragma comment(lib, "XTrap4Launcher_mt.lib" )
bool XTrap_Init()
{
//XTrap_L_Patch( XTRAP_PATCH_ARG, NULL, 60 );
XTrap_C_Start( XTRAP_PATCH_ARG, NULL );
return true;
}
bool XTrap_CheckInit()
{
XTrap_C_KeepAlive();
return true;
}
void XTrap_PollEvent()
{
static DWORD dwLastTick = 0;
DWORD dwCurrentTick = ::GetTickCount();
if( (dwCurrentTick - dwLastTick) > 2000 )
{
XTrap_C_CallbackAlive(2000);
dwLastTick = dwCurrentTick;
}
}
void XTrap_ValidateCheckStream( LPVOID PacketBufferIn, LPVOID PacketBufferOut )
{
XTrap_CS_Step2( PacketBufferIn, PacketBufferOut, XTRAP_PROTECT_PE | XTRAP_PROTECT_TEXT | XTRAP_PROTECT_EXCEPT_VIRUS );
}
void XTrap_SetUserInfo(LPCSTR szUserID, LPCSTR szServerName, LPCSTR szCharacterName, LPCSTR szCharacterClass, SOCKET hSocket)
{
XTrap_C_SetUserInfoEx( szUserID, szServerName, szCharacterName, szCharacterClass, NULL, hSocket );
}
#else
bool XTrap_Init()
{
return true;
}
bool XTrap_CheckInit()
{
return true;
}
void XTrap_PollEvent()
{
}
void XTrap_SetUserInfo(LPCSTR szUserID, LPCSTR szServerName, LPCSTR szCharacterName, LPCSTR szCharacterClass, SOCKET hSocket)
{
}
void XTrap_ValidateCheckStream( LPVOID PacketBufferIn, LPVOID PacketBufferOut )
{
}
#endif /* XTRAP_CLIENT_ENABLE */

View File

@ -1,8 +0,0 @@
#pragma once
bool XTrap_Init();
bool XTrap_CheckInit();
void XTrap_PollEvent();
void XTrap_ValidateCheckStream( LPVOID PacketBufferIn, LPVOID PacketBufferOut );
void XTrap_SetUserInfo(LPCSTR szUserID, LPCSTR szServerName, LPCSTR szCharacterName, LPCSTR szCharacterClass, SOCKET hSocket);