[DEV]AB 1
[DEV]AB
Sevdamsın 1
Sevdamsın
TuZaKK 1
TuZaKK
kaptanmikro1 1
kaptanmikro1
farkmt2official 2
farkmt2official
kralhakan2009 1
kralhakan2009
Vahsi Uzman 1
Vahsi Uzman
Bvural41 1
Bvural41
Hikaye Ekle

[C++] Check MD5 files from source

  • Konuyu başlatan Konuyu başlatan VegaS89
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 6
  • Görüntüleme Görüntüleme 2K

Türkiye'de ilk Mobil & PC Aynı Anda Metin2 Oyna. Triarchonline kalıcı ve uzun ömürlü yapısı ile 24 Temmuz'da açılıyor. | 1-99 Mobil Metin2 Triarch HEMEN TIKLA!

365b462669f44b38b259e2774daa3e54.png


8838dc98826f40cca43ce307d0a035ad.png




I know that this is not a good way of protection and can easily pass over it, and that's why I recommend not to use, but some people will probably be helpful.


Perhaps the code is less messy and is not exactly perfect, I did this 2 years ago for a server of mine and work perfectly last time.


Perhaps some people ask for money md5 check files etc and in 2017, everything is free on the internet, thousands of similar functions on Google.


If yours does not you like it and use it or think it's a crappy code are available to close this page and move over, this is only for people who needed it.

TR:

Bunun iyi bir koruma olmadığını ve kolayca geçilebileceğini biliyorum bu yüzden kullanmayı önermem,ancak bazıları için lazım olabilir.

Belki kodlar düzgün ve dağınık olabilir,2 yıl önce bunu bir sunucu için yapmıştım ve düzgün bir şekilde çalışıyor.

Yıl olmuş 2017 bazı insanlar bunu para ile satıyorlar,Google amcadan binlercesini bulabilirsiniz.

Eğer bu kodların kötü ve işe yaramaz olduğunu düşünüyorsanız konudan çıkabilirsiniz,bu konuyu arayanlar için paylaşıyorum.




Kod:
/*
*    Go in folder Svn/Client/UserInterface/ and add this file:
*    Download:
        https://mega.nz/#!vBw1UITR!8rJ1RbFVa47eIVHXm3HTtfRkY_iTFg_eaXgdIzMdI2A


*    If you want to obtaining md5 from files, you need only to drag file on box, and will show you "Current file MD5 checksum value".
    Download:
        http://www.winmd5.com/download/winmd5free.zip
*/


//@Svn/Client/UserInterface/Locale_inc.h
//Add where you want:
#define ENABLE_CHECK_FILES_MD5


//@Svn/Client/UserInterface/UserInterface.cpp
//1.) Search for:
#include "Version.h"
//2.) Add bellow:
#ifdef ENABLE_CHECK_FILES_MD5
    #include "md5.h"
    #include <windows.h>
#endif


//1.) Search for:
static const char * sc_apszPythonLibraryFilenames[] =
{
    [........]
};
//2.) Add after:
#ifdef ENABLE_CHECK_FILES_MD5
    #define MAX_ROWS_MD5 21
    static char * ar_szMD5FileNames[MAX_ROWS_MD5][2] =
    {
        // Example of list:
        { "lib/__future__.pyc", "d2505c6e64dc44a1745dda0905f4e787" },
        { "lib/copy_reg.pyc",   "5e996d35b598676b253dd25fa3809ef2" },
        { "lib/linecache.pyc",  "c4c28529b05b4093f629fb7b23603cd2" },
        { "lib/ntpath.pyc",     "966048f390a65bebf60f912845441110" },
        { "lib/os.pyc",         "9e1e72faaafcde16dfd0e643a31f0b74" },
        { "lib/site.pyc",       "8336371539a459e72d7110f0cb1ed84f" },
        { "lib/stat.pyc",       "3dc2d3d11ba4c668a0097fbd631c7be6" },
        { "lib/string.pyc",     "39c29074226b2196e7f13ce93560d3d0" },
        { "lib/traceback.pyc",  "009e6647dfac211b6e69c6b3f1ed5600" },
        { "lib/types.pyc",      "2bff75340aa1d94b88bfc7915a291564" },
        { "lib/UserDict.pyc",   "aabdd94dfe3a1b0092f0a414a935c091" },


        { "miles/mssdsp.flt",   "cb71b1791009eca618e9b1ad4baa4fa9" },
        { "miles/msssoft.m3d",  "bdc9ad58ade17dbd939522eee447416f" },
        { "miles/mssa3d.m3d",   "e089ce52b0617a6530069f22e0bdba2a" },
        { "miles/mss32.dll",    "6400e224b8b44ece59a992e6d8233719" },


        { "pack/Index",         "8823ca827dfc980798856e97f3568cef" },
        { "pack/root.eix",      "ce13b7c96f725b7d7c39cbe1ae2f8b4d" },
        { "pack/ETC.eix",       "7c0b756d079a9c76a220a724b9594eeb" },
        { "pack/locale_en.eix",    "5b1aea18b89330481e16eca94673951c" },
        { "pack/uiscript.eix",    "d211c0a83ff2c771946d73554916bd9a" },


        { "python27.dll",       "d219c0a8aff2c771946d73554916bd9a" }
        /*
            Unlimited files
        */
    };
#endif


//1.) Search for:
bool __IsLocaleVersion(LPSTR lpCmdLine)
{
    return (strcmp(lpCmdLine, "--perforce-revision") == 0);
}
//2.) Add bellow:
#ifdef ENABLE_CHECK_FILES_MD5
    void CheckMD5Filenames()
    {
        MD5 md5;
        for (int it = 0; it < _countof(ar_szMD5FileNames); it++)
        {
            if (strcmp(md5.digestFile(ar_szMD5FileNames[it][0]), ar_szMD5FileNames[it][1]))
            {
                char szBuf[512 + 1];
                snprintf(szBuf, sizeof(szBuf), "A file %s has been modified, please update autopatcher.", ar_szMD5FileNames[it][0]);
                MessageBoxA(NULL, szBuf, "#Metin2", NULL);
                exit(0);
            }
        }
    }
#endif


//1.) Search for:
    if (strstr(lpCmdLine, "--hackshield") != 0)
        return 0;
//2.) Add after:
#ifdef ENABLE_CHECK_FILES_MD5
    CheckMD5Filenames();
#endif
 
Moderatör tarafında düzenlendi:
365b462669f44b38b259e2774daa3e54.png


8838dc98826f40cca43ce307d0a035ad.png




I know that this is not a good way of protection and can easily pass over it, and that's why I recommend not to use, but some people will probably be helpful.


Perhaps the code is less messy and is not exactly perfect, I did this 2 years ago for a server of mine and work perfectly last time.


Perhaps some people ask for money md5 check files etc and in 2017, everything is free on the internet, thousands of similar functions on Google.


If yours does not you like it and use it or think it's a crappy code are available to close this page and move over, this is only for people who needed it.

TR:

Bunun iyi bir koruma olmadığını ve kolayca geçilebileceğini biliyorum bu yüzden kullanmayı önermem,ancak bazıları için lazım olabilir.

Belki kodlar düzgün ve dağınık olabilir,2 yıl önce bunu bir sunucu için yapmıştım ve düzgün bir şekilde çalışıyor.

Yıl olmuş 2017 bazı insanlar bunu para ile satıyorlar,Google amcadan binlercesini bulabilirsiniz.

Eğer bu kodların kötü ve işe yaramaz olduğunu düşünüyorsanız konudan çıkabilirsiniz,bu konuyu arayanlar için paylaşıyorum.




Kod:
/*
*    Go in folder Svn/Client/UserInterface/ and add this file:
*    Download:
        https://mega.nz/#!vBw1UITR!8rJ1RbFVa47eIVHXm3HTtfRkY_iTFg_eaXgdIzMdI2A


*    If you want to obtaining md5 from files, you need only to drag file on box, and will show you "Current file MD5 checksum value".
    Download:
        http://www.winmd5.com/download/winmd5free.zip
*/


//@Svn/Client/UserInterface/Locale_inc.h
//Add where you want:
#define ENABLE_CHECK_FILES_MD5


//@Svn/Client/UserInterface/UserInterface.cpp
//1.) Search for:
#include "Version.h"
//2.) Add bellow:
#ifdef ENABLE_CHECK_FILES_MD5
    #include "md5.h"
    #include <windows.h>
#endif


//1.) Search for:
static const char * sc_apszPythonLibraryFilenames[] =
{
    [........]
};
//2.) Add after:
#ifdef ENABLE_CHECK_FILES_MD5
    #define MAX_ROWS_MD5 21
    static char * ar_szMD5FileNames[MAX_ROWS_MD5][2] =
    {
        // Example of list:
        { "lib/__future__.pyc", "d2505c6e64dc44a1745dda0905f4e787" },
        { "lib/copy_reg.pyc",   "5e996d35b598676b253dd25fa3809ef2" },
        { "lib/linecache.pyc",  "c4c28529b05b4093f629fb7b23603cd2" },
        { "lib/ntpath.pyc",     "966048f390a65bebf60f912845441110" },
        { "lib/os.pyc",         "9e1e72faaafcde16dfd0e643a31f0b74" },
        { "lib/site.pyc",       "8336371539a459e72d7110f0cb1ed84f" },
        { "lib/stat.pyc",       "3dc2d3d11ba4c668a0097fbd631c7be6" },
        { "lib/string.pyc",     "39c29074226b2196e7f13ce93560d3d0" },
        { "lib/traceback.pyc",  "009e6647dfac211b6e69c6b3f1ed5600" },
        { "lib/types.pyc",      "2bff75340aa1d94b88bfc7915a291564" },
        { "lib/UserDict.pyc",   "aabdd94dfe3a1b0092f0a414a935c091" },


        { "miles/mssdsp.flt",   "cb71b1791009eca618e9b1ad4baa4fa9" },
        { "miles/msssoft.m3d",  "bdc9ad58ade17dbd939522eee447416f" },
        { "miles/mssa3d.m3d",   "e089ce52b0617a6530069f22e0bdba2a" },
        { "miles/mss32.dll",    "6400e224b8b44ece59a992e6d8233719" },


        { "pack/Index",         "8823ca827dfc980798856e97f3568cef" },
        { "pack/root.eix",      "ce13b7c96f725b7d7c39cbe1ae2f8b4d" },
        { "pack/ETC.eix",       "7c0b756d079a9c76a220a724b9594eeb" },
        { "pack/locale_en.eix",    "5b1aea18b89330481e16eca94673951c" },
        { "pack/uiscript.eix",    "d211c0a83ff2c771946d73554916bd9a" },


        { "python27.dll",       "d219c0a8aff2c771946d73554916bd9a" }
        /*
            Unlimited files
        */
    };
#endif


//1.) Search for:
bool __IsLocaleVersion(LPSTR lpCmdLine)
{
    return (strcmp(lpCmdLine, "--perforce-revision") == 0);
}
//2.) Add bellow:
#ifdef ENABLE_CHECK_FILES_MD5
    void CheckMD5Filenames()
    {
        MD5 md5;
        for (int it = 0; it < _countof(ar_szMD5FileNames); it++)
        {
            if (strcmp(md5.digestFile(ar_szMD5FileNames[it][0]), ar_szMD5FileNames[it][1]))
            {
                char szBuf[512 + 1];
                snprintf(szBuf, sizeof(szBuf), "A file %s has been modified, please update autopatcher.", ar_szMD5FileNames[it][0]);
                MessageBoxA(NULL, szBuf, "#Metin2", NULL);
                exit(0);
            }
        }
    }
#endif


//1.) Search for:
    if (strstr(lpCmdLine, "--hackshield") != 0)
        return 0;
//2.) Add after:
#ifdef ENABLE_CHECK_FILES_MD5
    CheckMD5Filenames();
#endif

anladığım kadarıyla başka exe girişlerimi kapatıyorsun?
 

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)

Geri
Üst