From bb44b31af9f1e256f83ffad3b2cf8a927031cf17 Mon Sep 17 00:00:00 2001 From: Exynox Date: Tue, 22 Nov 2022 06:55:33 +0200 Subject: [PATCH] Removed security & anti-cheat measures --- src/EterPack/EterPack.cpp | 38 -- src/EterPack/EterPack.h | 5 - src/EterPack/EterPackManager.cpp | 5 - src/EterPack/EterPackManager.h | 6 - src/EterPack/EterPackPolicy_CSHybridCrypt.cpp | 59 +-- src/EterPack/EterPackPolicy_CSHybridCrypt.h | 1 - src/UserInterface/AccountConnector.cpp | 11 - src/UserInterface/CheckLatestFiles.cpp | 64 --- src/UserInterface/CheckLatestFiles.h | 6 - src/UserInterface/HackShield.cpp | 380 ------------------ src/UserInterface/Hackshield.h | 23 -- src/UserInterface/HackshieldLicense.h | 0 src/UserInterface/HackshieldLicense_metin2.h | 5 - .../HackshieldLicense_metin2client.h | 5 - src/UserInterface/Locale_inc_BR.h | 2 - src/UserInterface/Locale_inc_CA.h | 2 - src/UserInterface/Locale_inc_EU.h | 2 - src/UserInterface/Locale_inc_EU2.h | 4 - src/UserInterface/Locale_inc_JP.h | 5 - src/UserInterface/Locale_inc_KO.h | 3 - src/UserInterface/Locale_inc_dev.h | 3 - src/UserInterface/NProtectGameGuard.cpp | 261 ------------ src/UserInterface/NProtectGameGuard.h | 10 - src/UserInterface/PythonApplication.cpp | 30 -- .../PythonNetworkStreamPhaseHandShake.cpp | 34 -- .../PythonNetworkStreamPhaseLogin.cpp | 3 - src/UserInterface/UserInterface.cpp | 37 -- src/UserInterface/UserInterface.vcxproj | 12 - .../UserInterface.vcxproj.filters | 39 -- src/UserInterface/WiseLogicXTrap.cpp | 81 ---- src/UserInterface/WiseLogicXTrap.h | 8 - 31 files changed, 1 insertion(+), 1143 deletions(-) delete mode 100644 src/UserInterface/CheckLatestFiles.cpp delete mode 100644 src/UserInterface/CheckLatestFiles.h delete mode 100644 src/UserInterface/HackShield.cpp delete mode 100644 src/UserInterface/Hackshield.h delete mode 100644 src/UserInterface/HackshieldLicense.h delete mode 100644 src/UserInterface/HackshieldLicense_metin2.h delete mode 100644 src/UserInterface/HackshieldLicense_metin2client.h delete mode 100644 src/UserInterface/NProtectGameGuard.cpp delete mode 100644 src/UserInterface/NProtectGameGuard.h delete mode 100644 src/UserInterface/WiseLogicXTrap.cpp delete mode 100644 src/UserInterface/WiseLogicXTrap.h diff --git a/src/EterPack/EterPack.cpp b/src/EterPack/EterPack.cpp index ceec3d6d..68b9def9 100644 --- a/src/EterPack/EterPack.cpp +++ b/src/EterPack/EterPack.cpp @@ -25,10 +25,6 @@ #include "../EterBase/Debug.h" #include "../EterBase/CRC32.h" -#ifdef __THEMIDA__ -#include -#endif - #include #include @@ -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) { -#ifdef __THEMIDA__ - VM_START -#endif - CLZObject * zObj = new CLZObject; if( !m_pCSHybridCryptPolicy->DecryptMemory( std::string(filename), static_cast(*data), index->data_size, *zObj) ) @@ -613,9 +605,6 @@ bool CEterPack::Get(CMappedFile& out_file, const char * filename, LPCVOID * data { *data = zObj->GetBuffer(); } -#ifdef __THEMIDA__ - VM_END -#endif } 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) { -#ifdef __THEMIDA__ - VM_START -#endif - CLZObject * zObj = new CLZObject; if( !m_pCSHybridCryptPolicy->DecryptMemory( std::string(filename), static_cast(*data), index->data_size, *zObj) ) @@ -727,9 +712,6 @@ bool CEterPack::Get2(CMappedFile& out_file, const char * filename, TEterPackInde { *data = zObj->GetBuffer(); } -#ifdef __THEMIDA__ - VM_END -#endif } return true; @@ -810,9 +792,6 @@ bool CEterPack::Extract() } 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) ) return false; @@ -834,9 +813,6 @@ bool CEterPack::Extract() writeFile.Write(zObj.GetBuffer(), zObj.GetBufferSize()); } zObj.Clear(); -#ifdef __THEMIDA__ - VM_END -#endif } else if (COMPRESSED_TYPE_NONE == index->compressed_type) 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 ) { -#ifdef __THEMIDA__ - VM_START -#endif m_pCSHybridCryptPolicy->GenerateCryptKey( std::string(filename) ); if( packType == COMPRESSED_TYPE_HYBRIDCRYPT_WITHSDB ) @@ -903,9 +876,6 @@ bool CEterPack::Put(const char * filename, const char * sourceFilename, BYTE pac return false; } } -#ifdef __THEMIDA__ - VM_END -#endif } 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 ) { -#ifdef __THEMIDA__ - VM_START -#endif - if( !m_pCSHybridCryptPolicy->EncryptMemory( std::string(filename), (const BYTE *)data, len, zObj ) ) { return false; @@ -1005,10 +971,6 @@ bool CEterPack::Put(const char * filename, LPCVOID data, long len, BYTE packType data = zObj.GetBuffer(); len = zObj.GetBufferSize(); -#ifdef __THEMIDA__ - VM_END -#endif - } diff --git a/src/EterPack/EterPack.h b/src/EterPack/EterPack.h index 6664f035..8ab20589 100644 --- a/src/EterPack/EterPack.h +++ b/src/EterPack/EterPack.h @@ -115,15 +115,10 @@ class CEterPack const std::string& GetPathName(); const char * GetDBName(); - //THEMIDA bool Get(CMappedFile & mappedFile, const char * filename, LPCVOID * data); - //THEMIDA 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); - //THEMIDA bool Put(const char * filename, LPCVOID data, long len, BYTE packType); bool Delete(const char * filename); diff --git a/src/EterPack/EterPackManager.cpp b/src/EterPack/EterPackManager.cpp index 11edc321..075eca8d 100644 --- a/src/EterPack/EterPackManager.cpp +++ b/src/EterPack/EterPackManager.cpp @@ -12,11 +12,6 @@ #define PATH_ABSOLUTE_YMIRWORK1 "d:/ymir work/" #define PATH_ABSOLUTE_YMIRWORK2 "d:\\ymir work\\" -#ifdef __THEMIDA__ -#include -#endif - - CEterPack* CEterPackManager::FindPack(const char* c_szPathName) { std::string strFileName; diff --git a/src/EterPack/EterPackManager.h b/src/EterPack/EterPackManager.h index dbc813a9..b202876f 100644 --- a/src/EterPack/EterPackManager.h +++ b/src/EterPack/EterPackManager.h @@ -37,13 +37,10 @@ class CEterPackManager : public CSingleton void SetSearchMode(bool bPackFirst); int GetSearchMode(); - //THEMIDA bool Get(CMappedFile & rMappedFile, const char * c_szFileName, LPCVOID * pData); - //THEMIDA bool GetFromPack(CMappedFile & rMappedFile, const char * c_szFileName, LPCVOID * pData); - //THEMIDA bool GetFromFile(CMappedFile & rMappedFile, const char * c_szFileName, LPCVOID * pData); bool isExist(const char * c_szFileName); bool isExistInPack(const char * c_szFileName); @@ -58,12 +55,9 @@ class CEterPackManager : public CSingleton const char * GetRootPackFileName(); //for hybridcrypt - //THEMIDA void WriteHybridCryptPackInfo(const char* pFileName); - //THEMIDA void RetrieveHybridCryptPackKeys( const BYTE* pStream ); - //THEMIDA void RetrieveHybridCryptPackSDB( const BYTE* pStream ); // ¸Þ¸ð¸®¿¡ ¸ÅÇÎµÈ ÆÑµé °¡¿îµ¥, Á¤¸®ÇؾßÇÒ °Íµé Á¤¸®. diff --git a/src/EterPack/EterPackPolicy_CSHybridCrypt.cpp b/src/EterPack/EterPackPolicy_CSHybridCrypt.cpp index 4cb11ae2..c8de891d 100644 --- a/src/EterPack/EterPackPolicy_CSHybridCrypt.cpp +++ b/src/EterPack/EterPackPolicy_CSHybridCrypt.cpp @@ -13,9 +13,6 @@ using namespace CryptoPP; #define CIPHER_MODE CTR_Mode -#ifdef __THEMIDA__ -#include -#endif //Cipher //Block Size //Key Length @@ -66,10 +63,6 @@ bool EterPackPolicy_CSHybridCrypt::IsContainingCryptKey() const bool EterPackPolicy_CSHybridCrypt::GenerateCryptKey( std::string& rfileName ) { -#ifdef __THEMIDA__ - VM_START -#endif - //make lower & extract ext std::string extName = GetFileExt(rfileName); stl_lowers(extName); @@ -97,19 +90,11 @@ bool EterPackPolicy_CSHybridCrypt::GenerateCryptKey( std::string& rfileName ) } m_mapHybridCryptKey[dwExtHash] = info; -#ifdef __THEMIDA__ - VM_END -#endif - return true; } bool EterPackPolicy_CSHybridCrypt::GetPerFileCryptKey( std::string& rfileName, eHybridCipherAlgorithm& eAlgorithm, TEncryptKey& key, TEncryptIV& iv ) { -#ifdef __THEMIDA__ - VM_START -#endif - std::string fileNamelower = rfileName; 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(iv.iv, cit->second.uEncryptIV.iv, sizeof(iv) ); - - //Themida Warning for( int i = 0; i < (sizeof(key)/sizeof(dwfileNameCrc)); ++i) { *((DWORD*)key.key + i) ^= dwfileNameCrc; @@ -141,9 +124,6 @@ bool EterPackPolicy_CSHybridCrypt::GetPerFileCryptKey( std::string& rfileName, e { *((DWORD*)iv.iv + i) ^= dwfileNameCrc; } -#ifdef __THEMIDA__ - VM_END -#endif 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 ) { -#ifdef __THEMIDA__ - VM_START -#endif - eHybridCipherAlgorithm eAlgorithm; TEncryptKey key; TEncryptIV iv; @@ -207,19 +183,11 @@ bool EterPackPolicy_CSHybridCrypt::EncryptMemory( std::string& rfileName, IN con zObj.AllocBuffer(iSrcLen); memcpy(zObj.GetBuffer(), strCipher.c_str(), strCipher.length() ); -#ifdef __THEMIDA__ - VM_END -#endif - return true; } bool EterPackPolicy_CSHybridCrypt::DecryptMemory( std::string& rfilename, IN const BYTE* pEncryptedData, IN int iEncryptedLen, OUT CLZObject& zObj ) { -#ifdef __THEMIDA__ - VM_START -#endif - eHybridCipherAlgorithm eAlgorithm; TEncryptKey key; TEncryptIV iv; @@ -273,10 +241,6 @@ bool EterPackPolicy_CSHybridCrypt::DecryptMemory( std::string& rfilename, IN con zObj.AllocBuffer(iEncryptedLen); memcpy(zObj.GetBuffer(), strDecipher.c_str(), strDecipher.length() ); -#ifdef __THEMIDA__ - VM_END -#endif - 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 ) { -#ifdef __THEMIDA__ - VM_START -#endif - std::string fileNamelower = rfilename; stl_lowers( fileNamelower ); @@ -385,19 +345,13 @@ bool EterPackPolicy_CSHybridCrypt::GenerateSupplementaryDataBlock(std::string& r memcpy( &sdbVector[0], pDestData + iDestLen, iSDBSize ); } -#ifdef __THEMIDA__ - VM_END -#endif + return true; } bool EterPackPolicy_CSHybridCrypt::GetSupplementaryDataBlock( std::string& rfilename, OUT LPBYTE& pSDB, OUT int& iSDBSize ) { -#ifdef __THEMIDA__ - VM_START -#endif - std::string fileNamelower = rfilename; stl_lowers( fileNamelower ); @@ -421,9 +375,6 @@ bool EterPackPolicy_CSHybridCrypt::GetSupplementaryDataBlock( std::string& rfile } pSDB = (BYTE*)&vecSDB[0]; -#ifdef __THEMIDA__ - VM_END -#endif return true; } @@ -468,10 +419,6 @@ void EterPackPolicy_CSHybridCrypt::WriteSupplementaryDataBlockToFile( CFileBase& int EterPackPolicy_CSHybridCrypt::ReadSupplementatyDataBlockFromStream( IN const BYTE* pStream ) { -#ifdef __THEMIDA__ - VM_START -#endif - //DWORD dwFileIdentifier; //std::vector vecSDBStream; @@ -495,9 +442,5 @@ int EterPackPolicy_CSHybridCrypt::ReadSupplementatyDataBlockFromStream( IN const m_mapSDBMap[dwFileNameHash] = info; } -#ifdef __THEMIDA__ - VM_END -#endif - return iStreamOffset; } diff --git a/src/EterPack/EterPackPolicy_CSHybridCrypt.h b/src/EterPack/EterPackPolicy_CSHybridCrypt.h index 63f76ab2..26baf96f 100644 --- a/src/EterPack/EterPackPolicy_CSHybridCrypt.h +++ b/src/EterPack/EterPackPolicy_CSHybridCrypt.h @@ -19,7 +19,6 @@ enum eHybridCipherAlgorithm class CFileBase; class CLZObject; -//THEMIDA class EterPackPolicy_CSHybridCrypt { public: diff --git a/src/UserInterface/AccountConnector.cpp b/src/UserInterface/AccountConnector.cpp index 33eb82f3..6badd1c3 100644 --- a/src/UserInterface/AccountConnector.cpp +++ b/src/UserInterface/AccountConnector.cpp @@ -5,9 +5,6 @@ #include "../EterBase/tea.h" #include "../EterPack/EterPackManager.h" -#include "Hackshield.h" -#include "WiseLogicXTrap.h" - // CHINA_CRYPT_KEY extern DWORD g_adwEncryptKey[4]; extern DWORD g_adwDecryptKey[4]; @@ -282,14 +279,6 @@ bool CAccountConnector::__AuthState_RecvPhase() } #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; LoginPacket.header = HEADER_CG_LOGIN3; diff --git a/src/UserInterface/CheckLatestFiles.cpp b/src/UserInterface/CheckLatestFiles.cpp deleted file mode 100644 index 4b036c64..00000000 --- a/src/UserInterface/CheckLatestFiles.cpp +++ /dev/null @@ -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 diff --git a/src/UserInterface/CheckLatestFiles.h b/src/UserInterface/CheckLatestFiles.h deleted file mode 100644 index 9726cbd3..00000000 --- a/src/UserInterface/CheckLatestFiles.h +++ /dev/null @@ -1,6 +0,0 @@ -#pragma once - -#if defined(CHECK_LATEST_DATA_FILES) -bool CheckLatestFiles( void ); -bool CheckLatestFiles_PollEvent( void ); -#endif diff --git a/src/UserInterface/HackShield.cpp b/src/UserInterface/HackShield.cpp deleted file mode 100644 index 8db43ce7..00000000 --- a/src/UserInterface/HackShield.cpp +++ /dev/null @@ -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 */ diff --git a/src/UserInterface/Hackshield.h b/src/UserInterface/Hackshield.h deleted file mode 100644 index 0deb8618..00000000 --- a/src/UserInterface/Hackshield.h +++ /dev/null @@ -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 -#define METIN2HS_INCLUDE_HSUSERUTIL -#define METIN2HS_INCLUDE_HSHIELD -#define METIN2HS_INCLUDE_HSHIELDLIBLINK -#define METIN2HS_INCLUDE_ANTICPXSVR - -bool HackShield_Init(); -bool HackShield_Shutdown(); -bool HackShield_PollEvent(); -void HackShield_SetUserInfo(const char* szAccountName); - -#endif /* USE_AHNLAB_HACKSHIELD */ diff --git a/src/UserInterface/HackshieldLicense.h b/src/UserInterface/HackshieldLicense.h deleted file mode 100644 index e69de29b..00000000 diff --git a/src/UserInterface/HackshieldLicense_metin2.h b/src/UserInterface/HackshieldLicense_metin2.h deleted file mode 100644 index 380647da..00000000 --- a/src/UserInterface/HackshieldLicense_metin2.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -#define METIN2HS_EXE_FILE_NAME "metin2.bin" -#define METIN2HS_CODE 5858 -#define METIN2HS_LICENSE "2A126BBDC6C61351124B2872" diff --git a/src/UserInterface/HackshieldLicense_metin2client.h b/src/UserInterface/HackshieldLicense_metin2client.h deleted file mode 100644 index f60dc54d..00000000 --- a/src/UserInterface/HackshieldLicense_metin2client.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -#define METIN2HS_EXE_FILE_NAME "metin2client.bin" -#define METIN2HS_CODE 5857 -#define METIN2HS_LICENSE "B1FECACB51BD40B919EFCDB9" diff --git a/src/UserInterface/Locale_inc_BR.h b/src/UserInterface/Locale_inc_BR.h index b8ca7e6d..7ce2bf5c 100644 --- a/src/UserInterface/Locale_inc_BR.h +++ b/src/UserInterface/Locale_inc_BR.h @@ -1,7 +1,5 @@ #define LOCALE_SERVICE_BRAZIL // ºê¶óÁú -#define XTRAP_CLIENT_ENABLE -#define XTRAP_PATCH_ARG "660970B4483BDC32C5266D9844CFED6230832A3E2F95F8DD45DB9AED6AE8B837900845956432BD8F2D14136A8CF8BD970A93B783971789382A493B68C5C2BA650F7D04245246E41FB1670C4E955F790A585C3F5D8EB0BADD81C6DD2DB7" #define ENABLE_COSTUME_SYSTEM #define ENABLE_ENERGY_SYSTEM #define ENABLE_DRAGON_SOUL_SYSTEM \ No newline at end of file diff --git a/src/UserInterface/Locale_inc_CA.h b/src/UserInterface/Locale_inc_CA.h index 7ae11be1..e60d4872 100644 --- a/src/UserInterface/Locale_inc_CA.h +++ b/src/UserInterface/Locale_inc_CA.h @@ -1,6 +1,4 @@ #define LOCALE_SERVICE_CANADA // ij³ª´Ù -#define XTRAP_CLIENT_ENABLE -#define XTRAP_PATCH_ARG "660970B4953BDCCFC5266D9844CFED62D9D88487BAFA5824E622544D919AC5C535B7B5BB27DF7189499DA1EFA3745A052BE7AE8B12275EDE90BAFDD333407BF80F7D04245246E40AF7650C4AD8583917B21AD7B2AFDE3D4F588C800D128456E1DFEC" #define ENABLE_COSTUME_SYSTEM #define ENABLE_ENERGY_SYSTEM diff --git a/src/UserInterface/Locale_inc_EU.h b/src/UserInterface/Locale_inc_EU.h index b9999da0..70c2583a 100644 --- a/src/UserInterface/Locale_inc_EU.h +++ b/src/UserInterface/Locale_inc_EU.h @@ -1,5 +1,3 @@ #define LOCALE_SERVICE_EUROPE // À¯·´ #define LSS_SECURITY_KEY "1234abcd5678efgh" - -#define CHECK_LATEST_DATA_FILES diff --git a/src/UserInterface/Locale_inc_EU2.h b/src/UserInterface/Locale_inc_EU2.h index 39824e29..5add6e1b 100644 --- a/src/UserInterface/Locale_inc_EU2.h +++ b/src/UserInterface/Locale_inc_EU2.h @@ -1,9 +1,5 @@ #define LOCALE_SERVICE_EUROPE // À¯·´ -//#define USE_AHNLAB_HACKSHIELD - -//#define CHECK_LATEST_DATA_FILES - #define LSS_SECURITY_KEY "1234abcd5678efgh" #define ENABLE_COSTUME_SYSTEM diff --git a/src/UserInterface/Locale_inc_JP.h b/src/UserInterface/Locale_inc_JP.h index 72651b88..bdc03217 100644 --- a/src/UserInterface/Locale_inc_JP.h +++ b/src/UserInterface/Locale_inc_JP.h @@ -3,11 +3,6 @@ #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_ENERGY_SYSTEM #define USE_OPENID diff --git a/src/UserInterface/Locale_inc_KO.h b/src/UserInterface/Locale_inc_KO.h index e53d11c3..ca7ecee8 100644 --- a/src/UserInterface/Locale_inc_KO.h +++ b/src/UserInterface/Locale_inc_KO.h @@ -1,8 +1,5 @@ #include "Locale_inc_EU.h" -//#define XTRAP_CLIENT_ENABLE -#define XTRAP_PATCH_ARG "660970B47839DCBFC5206D9844CFED627251D23A44458651BD1F0E57E26D7C85B4CC00C30B1D1724026D5F65A662992141DB6C233A24040C5A6BCD6D25A5576D0F7D04245246E417A4610E56955D721985C1414D9E254947FC" - #define ENABLE_COSTUME_SYSTEM #define ENABLE_ENERGY_SYSTEM #define ENABLE_DRAGON_SOUL_SYSTEM diff --git a/src/UserInterface/Locale_inc_dev.h b/src/UserInterface/Locale_inc_dev.h index 3757066c..ad2f9612 100644 --- a/src/UserInterface/Locale_inc_dev.h +++ b/src/UserInterface/Locale_inc_dev.h @@ -1,8 +1,5 @@ #include "Locale_inc_EU.h" -//#define XTRAP_CLIENT_ENABLE -//#define XTRAP_PATCH_ARG "660970B47839DCBFC5206D9844CFED627251D23A44458651BD1F0E57E26D7C85B4CC00C30B1D1724026D5F65A662992141DB6C233A24040C5A6BCD6D25A5576D0F7D04245246E417A4610E56955D721985C1414D9E254947FC" - #define ENABLE_COSTUME_SYSTEM #define ENABLE_ENERGY_SYSTEM #define ENABLE_DRAGON_SOUL_SYSTEM diff --git a/src/UserInterface/NProtectGameGuard.cpp b/src/UserInterface/NProtectGameGuard.cpp deleted file mode 100644 index 541d6987..00000000 --- a/src/UserInterface/NProtectGameGuard.cpp +++ /dev/null @@ -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°õ?¤¤¡Cµyµ¥??©Î¬O?·s±Ò°Ê¤§«á¦A°õ?¡C "); - break; - case NPGAMEMON_ERROR_GAME_EXIST: - sprintf(msg, "¹CÀ¸?½Æ°õ?©ÎGameGuard¤w¦b°õ?¤¤¡Cµ²?¹CÀ¸«á½Ð?·s°õ?¡C "); - break; - case NPGAMEMON_ERROR_INIT: - sprintf(msg, "GameGuardªì´Á¤Æ¿ù?¡C?·s±Ò°Ê«á¦A°õ?©Î¬OÃö³¬¥i??µo¥Í½Ä¬ðªº?¦¡¤§«á¦A°õ?¡C "); - break; - case NPGAMEMON_ERROR_AUTH_GAMEGUARD: - case NPGAMEMON_ERROR_NFOUND_GG: - case NPGAMEMON_ERROR_AUTH_INI: - case NPGAMEMON_ERROR_NFOUND_INI: - sprintf(msg, "µLGameGuardÀÉ?©Î²£¥Í²§ÅÜ¡C½Ð¦w¸ËGameGuard ªº¦w¸ËÀÉ¡C "); - break; - case NPGAMEMON_ERROR_CRYPTOAPI: - sprintf(msg, "Windowªº¬Y³¡¥÷¨t²ÎÀÉ?¨ü·l¡C½Ð?·s¦w¸ËIE¡C "); - break; - case NPGAMEMON_ERROR_EXECUTE: - sprintf(msg, "GameGuard°õ?¥¢±Ñ¡C½Ð?·s°õ?GameGuard¦w¸ËÀÉ¡C "); - break; - case NPGAMEMON_ERROR_ILLEGAL_PRG: - sprintf(msg, "µo?«Dªk?¦¡¡C½Ðµ²?¤£»Ý­nªº?¦¡¤§«á?·s°õ?¡C "); - break; - case NPGMUP_ERROR_ABORT: - sprintf(msg, "GameGuard¤É?¨ú?¡C¦pªG?ª½µLªk³s½u¡A½Ð?½Õ¾ãºô¸ô©Î?¤Hªº¨¾¤õÀð?©w¡C "); - break; - case NPGMUP_ERROR_CONNECT: - case NPGMUP_ERROR_DOWNCFG: - sprintf(msg, "GameGuard§ïª©(¤É?)?ªA³s½u¥¢±Ñ¡Cµyµ¥¤§«á¦A?·s°õ?©Î¬O¦pªG¦³?¤H¨¾¤õÀ𪺸ܽнվã?¤H¨¾¤õÀð?©w¤§«á¦A¸Õ¡C "); - break; - case NPGMUP_ERROR_AUTH: - sprintf(msg, "GameGuard§ïª©¨S?§¹¦¨¡C½Ð?°±¤î°õ?¨¾¬r?¦¡«á¦A?·s°õ?©Î¬O¨Ï¥ÎPCºÞ²z?¦¡½Õ¾ã?©w«á¦A°õ?¡C "); - break; - case NPGAMEMON_ERROR_NPSCAN: - sprintf(msg, "¯f¬r¤Îµn¤JÀb«È¤J«I¤u¨ãÀˬd¼Ò²Õ¥¢±Ñ¡C¥i?¬O°O¾ÐÅ餣¨¬©Î¬O·P¬V¤F¯f¬r¡C "); - break; - default: - sprintf(msg, "GameGuard°õ??µo?¿ù?¡C½Ð±N¹CÀ¸¸ê?§¨¸ÌªºGameGuard¸ê?§¨¤¤ªº*.erlÀÉ?ÀH¹q¤l¶l¥ó??±H¨ìgame2@inca.co.kr«H½c¡C "); - 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, "µo?speed hack¡C "); - break; - case NPGAMEMON_GAMEHACK_KILLED: - sprintf(msg, "µo?¹CÀ¸hack¡C "); - break; - case NPGAMEMON_GAMEHACK_DETECT: - sprintf(msg, "µo?¹CÀ¸hack¡C "); - break; - case NPGAMEMON_GAMEHACK_DOUBT: - sprintf(msg, "¹CÀ¸©ÎGameGuard¤wÅÜ?¡C "); - 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 */ diff --git a/src/UserInterface/NProtectGameGuard.h b/src/UserInterface/NProtectGameGuard.h deleted file mode 100644 index b0200773..00000000 --- a/src/UserInterface/NProtectGameGuard.h +++ /dev/null @@ -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 */ diff --git a/src/UserInterface/PythonApplication.cpp b/src/UserInterface/PythonApplication.cpp index e86c1fe8..00bb8318 100644 --- a/src/UserInterface/PythonApplication.cpp +++ b/src/UserInterface/PythonApplication.cpp @@ -12,11 +12,6 @@ #include "ProcessScanner.h" -#include "HackShield.h" -#include "NProtectGameGuard.h" -#include "WiseLogicXTrap.h" -#include "CheckLatestFiles.h" - extern void GrannyCreateSharedDeformBuffer(); extern void GrannyDestroySharedDeformBuffer(); @@ -398,17 +393,6 @@ void CPythonApplication::SkipRenderBuffering(DWORD dwSleepMSec) 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(); // m_Profiler.Clear(); @@ -460,11 +444,6 @@ bool CPythonApplication::Process() m_kGuildMarkUploader.Process(); -#ifdef USE_NPROTECT_GAMEGUARD - if (GameGuard_IsError()) - return false; -#endif - m_kGuildMarkDownloader.Process(); m_kAccountConnector.Process(); @@ -1113,15 +1092,6 @@ bool CPythonApplication::Create(PyObject * poSelf, const char * c_szName, int wi 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()) { CPythonIME::Instance().UseDefaultIME(); diff --git a/src/UserInterface/PythonNetworkStreamPhaseHandShake.cpp b/src/UserInterface/PythonNetworkStreamPhaseHandShake.cpp index 94ae0d82..4681f7d4 100644 --- a/src/UserInterface/PythonNetworkStreamPhaseHandShake.cpp +++ b/src/UserInterface/PythonNetworkStreamPhaseHandShake.cpp @@ -3,12 +3,6 @@ #include "PythonApplication.h" #include "Packet.h" #include "../eterpack/EterPackManager.h" -#include "Hackshield.h" -#include "WiseLogicXTrap.h" - -#ifdef USE_AHNLAB_HACKSHIELD -#include METIN2HS_INCLUDE_HSHIELD -#endif // HandShake --------------------------------------------------------------------------- void CPythonNetworkStream::HandShakePhase() @@ -202,33 +196,7 @@ bool CPythonNetworkStream::RecvHSCheckRequest() 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; - } -#endif - - if (!Send(sizeof(pack_ret), &pack_ret)) - { - TraceError("HShield: Send failed"); - - return false; - } - - return true; -#else return false; -#endif } bool CPythonNetworkStream::RecvXTrapVerifyRequest() @@ -245,8 +213,6 @@ bool CPythonNetworkStream::RecvXTrapVerifyRequest() TPacketXTrapCSVerify packet_res; packet_res.bHeader = HEADER_CG_XTRAP_ACK; - XTrap_ValidateCheckStream( packet.bPacketData, packet_res.bPacketData ); - if (!Send(sizeof(packet_res), &packet_res)) { TraceError("XTrap: Send failed"); diff --git a/src/UserInterface/PythonNetworkStreamPhaseLogin.cpp b/src/UserInterface/PythonNetworkStreamPhaseLogin.cpp index 47078950..7c383d27 100644 --- a/src/UserInterface/PythonNetworkStreamPhaseLogin.cpp +++ b/src/UserInterface/PythonNetworkStreamPhaseLogin.cpp @@ -4,9 +4,6 @@ #include "Test.h" #include "AccountConnector.h" -#include "Hackshield.h" -#include "WiseLogicXTrap.h" - // Login --------------------------------------------------------------------------- void CPythonNetworkStream::LoginPhase() { diff --git a/src/UserInterface/UserInterface.cpp b/src/UserInterface/UserInterface.cpp index a5c06801..62aa51d3 100644 --- a/src/UserInterface/UserInterface.cpp +++ b/src/UserInterface/UserInterface.cpp @@ -14,12 +14,6 @@ #include "../CWebBrowser/CWebBrowser.h" #include "../eterBase/CPostIt.h" -#include "CheckLatestFiles.h" - -#include "Hackshield.h" -#include "NProtectGameGuard.h" -#include "WiseLogicXTrap.h" - extern "C" { extern int _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]) { -#ifdef XTRAP_CLIENT_ENABLE - if (!XTrap_CheckInit()) - return false; -#endif system("pause"); } if (!pyLauncher.RunFile("system.py")) @@ -574,26 +564,6 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi LocaleService_LoadConfig("locale.cfg"); 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 bAuthKeyChecked = false; //OpenID ¹öÀü¿¡¼­ ÀÎÁõÅ°°¡ µé¾î¿Ô´ÂÁö ¾Ë±â À§ÇÑ ÀÎÀÚ. int nArgc = 0; @@ -717,10 +687,6 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi Main(hInstance, lpCmdLine); -#ifdef USE_NPROTECT_GAMEGUARD - GameGuard_NoticeMessage(); -#endif - WebBrowser_Cleanup(); ::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); Clean: -#ifdef USE_AHNLAB_HACKSHIELD - HackShield_Shutdown(); -#endif SAFE_FREE_GLOBAL(szArgv); return 0; diff --git a/src/UserInterface/UserInterface.vcxproj b/src/UserInterface/UserInterface.vcxproj index 97166a25..801e36e9 100644 --- a/src/UserInterface/UserInterface.vcxproj +++ b/src/UserInterface/UserInterface.vcxproj @@ -315,11 +315,9 @@ - - @@ -333,7 +331,6 @@ - @@ -410,7 +407,6 @@ Create - @@ -420,15 +416,9 @@ - - - - - - @@ -450,7 +440,6 @@ - @@ -481,7 +470,6 @@ - diff --git a/src/UserInterface/UserInterface.vcxproj.filters b/src/UserInterface/UserInterface.vcxproj.filters index ad2809f9..f28ff602 100644 --- a/src/UserInterface/UserInterface.vcxproj.filters +++ b/src/UserInterface/UserInterface.vcxproj.filters @@ -38,9 +38,6 @@ {9f4f7fe3-b9af-4b7c-8b0b-43dadd7f4a37} - - {60b2fc54-3c61-4113-b664-e7ad8059d970} - @@ -301,18 +298,6 @@ Network - - Security - - - Security - - - Security - - - Security - @@ -490,30 +475,6 @@ Network - - Security - - - Security - - - Security - - - Security - - - Security - - - Security - - - Security - - - Security - diff --git a/src/UserInterface/WiseLogicXTrap.cpp b/src/UserInterface/WiseLogicXTrap.cpp deleted file mode 100644 index 2d88712a..00000000 --- a/src/UserInterface/WiseLogicXTrap.cpp +++ /dev/null @@ -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 - - #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 */ diff --git a/src/UserInterface/WiseLogicXTrap.h b/src/UserInterface/WiseLogicXTrap.h deleted file mode 100644 index e699f232..00000000 --- a/src/UserInterface/WiseLogicXTrap.h +++ /dev/null @@ -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); -