Active Member Koray 2001 Posted June 21, 2015 Active Member Share Posted June 21, 2015 (edited) UserInterface/CheckLatestFiles.cpp Select all codes and change with this #include "StdAfx.h" #if defined(CHECK_LATEST_DATA_FILES) #include "CheckLatestFiles.h" #include "resource.h" static struct SCHECKFILELIST { const char* szFileName; DWORD dwCRC32; ULONGLONG ullSize; } s_astFileHashList[] = { // filename crc(dword) size(ull)[optional] { "errorlog.txt", 0xf7c257a0, 135 }, { "file1.py", 0xf15468a0, 169 }, { "file.epk", 0xf7685410, 465 } //etc. }; static bool gs_bQuit = false; bool CheckLatestFiles_PollEvent( void ) { return gs_bQuit; } int GetFileSize(char* FileName) { HANDLE hFile = CreateFileA(FileName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); return GetFileSize(hFile, NULL); } inline bool is_file_exist(const std::string& name) { struct stat buffer; return (stat(name.c_str(), &buffer) == 0); } // 데이타 파일 CRC32 값 검사하기 //size control added bool CheckFileHash( const char* szFileName, DWORD dwCRC32, ULONGLONG ullFileSize = NULL) { char szMessage[256]; if (!is_file_exist(szFileName)) { _snprintf(szMessage, sizeof(szMessage)/sizeof(szMessage[0])-1, ApplicationStringTable_GetStringz(IDS_ERR_CANNOT_READ_FILE, "ERR_CANNOT_READ_FILE"), szFileName); ApplicationSetErrorString(szMessage); return false; } else { 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; } else { int ullLocalSize = GetFileSize(szFileName); if ( ullFileSize) { if (ullLocalSize != ullFileSize) { ApplicationSetErrorString(("%s size not valid", szFileName)); return false; } } } } return true; } UINT CALLBACK CheckLatestFilesEntry(void * pThis) { ::Sleep( 500 ); for( int i=0; s_astFileHashList[i].szFileName; i++ ) { if(s_astFileHashList[i].ullSize) { if(!CheckFileHash(s_astFileHashList[i].szFileName, s_astFileHashList[i].dwCRC32, s_astFileHashList[i].ullSize)){ gs_bQuit = true; break; } } else { if(!CheckFileHash(s_astFileHashList[i].szFileName, s_astFileHashList[i].dwCRC32)){ gs_bQuit = true; break; } } } return true; } 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 Now change or add { "errorlog.txt", 0xf7c257a0, 135 }, { "file1.py", 0xf15468a0, 169 }, { "file.epk", 0xf7685410, 465 } This list according to yourself(Size is optional) Now open Locale_inc.h #define CHECK_LATEST_DATA_FILES and add this line Edited June 21, 2015 by Koray 2 Link to comment Share on other sites More sharing options...
MORTE 78 Posted June 21, 2015 Share Posted June 21, 2015 // filename crc(dword) size(ull)[optional] { "errorlog.txt", 0xf7c257a0, 135 }, { "file1.py", 0xf15468a0, 169 }, { "file.epk", 0xf7685410, 465 } //etc. Como how do you know the crc? 0xf7c257a0 Link to comment Share on other sites More sharing options...
Premium FlorinMarian 122 Posted June 21, 2015 Premium Share Posted June 21, 2015 Thank you for your post but it's not a useful release. A lot of players know how to use "CRC32 changer". A md5 encryption can be very useful. 1 Shared Hosting | Domain names | Dedicated Servers | VPS HAZI.ro Link to comment Share on other sites More sharing options...
MORTE 78 Posted June 21, 2015 Share Posted June 21, 2015 They can also modify the bin and there is no check Link to comment Share on other sites More sharing options...
Ira™ 41 Posted June 21, 2015 Share Posted June 21, 2015 (edited) Everything you have written there is wrong. Edited June 21, 2015 by Ira™ Link to comment Share on other sites More sharing options...
Active Member Exygo 1091 Posted June 21, 2015 Active Member Share Posted June 21, 2015 Everything you have written there is wrong. Prove it https://www.youtube.com/channel/UCQ8mAeda9TWq6SsTzB53emw/videos Link to comment Share on other sites More sharing options...
Night 366 Posted June 21, 2015 Share Posted June 21, 2015 i used this without changes months ago but it took too much time especially if you forget it or something like that , the size check could be usefull but if not protected then it is kids play to edit it. Link to comment Share on other sites More sharing options...
metin2team 766 Posted June 21, 2015 Share Posted June 21, 2015 (edited) i used this without changes months ago but it took too much time especially if you forget it or something like that , the size check could be usefull but if not protected then it is kids play to edit it. I've been using that since March 2014 with changes.. but for you, you have to change the CRC32 to something else md5 for example ... because: http://lmgtfy.com/?q=peid+crc+fix with such tools you can fix the crc and bypass the check Edited June 21, 2015 by metin2team Link to comment Share on other sites More sharing options...
Active Member Koray 2001 Posted June 21, 2015 Author Active Member Share Posted June 21, 2015 (edited) Yes possibly crc check very easy bypass therefore I added size option Btw If you need crc getter tool I recommend this http://www.igorware.com/hasher Edited June 21, 2015 by Koray 1 1 Link to comment Share on other sites More sharing options...
MORTE 78 Posted June 21, 2015 Share Posted June 21, 2015 (edited) Koray it is possible for any check on the game case muddem the metin2client.bin ? Edited August 24, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Ira™ 41 Posted June 22, 2015 Share Posted June 22, 2015 (edited) Everything you have written there is wrong. Prove it Unlike you who, only copy that is on dev, and seel for money.I do not sell protections that are already free. What I mean is that no one should sell what is not his.I am against you, who are working illegally sell and source. Edited June 22, 2015 by Ira™ Link to comment Share on other sites More sharing options...
Recommended Posts