Codex anti-hack full source code (c++)

Page 10 of 12 FirstFirst ... 23456789101112 LastLast
Results 226 to 250 of 276
  1. #226
    Account Upgraded | Title Enabled! Cogito Ergo Sum is offline
    MemberRank
    Sep 2014 Join Date
    Guarujá-BrasilLocation
    228Posts

    Re: Codex anti-hack full source code (c++)

    [How To Download NEW Version?]

    Thats takes some time. I need to make video tutorial and clean some things, add another ones...

    Thats below are the whole code i'm working at this time, including launcher dll codes. :)

    Just for fun! You can play with the "new ones".

    ;)

    https://mega.co.nz/#!okNikIqb!TcbF-T3QyG53BPOriN7R9yiZLJa8B5nGY9O02crMhtM

  2. #227
    Valued Member titansmu is offline
    MemberRank
    Sep 2012 Join Date
    148Posts

    Re: Codex anti-hack full source code (c++)

    Sir @Cogito Ergo Sum how to make Minimizer.dll change to my type of file. not a dll a bat file to task kill the conhost.exe. instead of creating a file that they will manually open to kill conhost.exe how to make the minimizer.dll to bat file so that if they open main it will kill also conhost.exe
    Last edited by titansmu; 02-02-15 at 01:08 PM. Reason: Tag

  3. #228
    Account Upgraded | Title Enabled! Cogito Ergo Sum is offline
    MemberRank
    Sep 2014 Join Date
    Guarujá-BrasilLocation
    228Posts

    Re: Codex anti-hack full source code (c++)

    I think this one is a killer code, don't allow change file names anymore:

    Detecta_Name.cpp

    Code:
    void Name_by_Handle(){
    if    (!GetModuleHandle(carrega.Nome_do_Main)){ 
    Detect_HandlesM();
     }
    else
     {
     Sleep (10);
     }
    
    
    if (!GetModuleHandle(carrega.Nome_da_Dll)){
    Detect_HandlesD();
     }
    else
     {
     Sleep (10);
    }
    }
    Limit_Single_Instance.cpp

    Just one game instance at the time

    Detecta_Inject_API.cpp

    Are silently, dll inject just dont work.

    And a lot of another things like pipe and size for launcher integration, hardware ban corrections, hidden files, hack log upload.

    - - - Updated - - -

    [ not a dll a bat file to task kill the conhost.exe. ]


    WinExec("Exemple.exe", SW_HIDE);

  4. #229
    Enthusiast Fineas is offline
    MemberRank
    Aug 2012 Join Date
    TimisoaraLocation
    38Posts

    Re: Codex anti-hack full source code (c++)

    I hope there will be a serverside protection as the development goes on.

  5. #230
    Account Upgraded | Title Enabled! Cogito Ergo Sum is offline
    MemberRank
    Sep 2014 Join Date
    Guarujá-BrasilLocation
    228Posts

    Re: Codex anti-hack full source code (c++)

    Server side protection already exist. Problem is, MU connectstat have a several bug...

    Someone know how to disconnect users from MU using sql?
    Last edited by Cogito Ergo Sum; 03-02-15 at 01:11 PM.

  6. #231
    Valued Member titansmu is offline
    MemberRank
    Sep 2012 Join Date
    148Posts

    Re: Codex anti-hack full source code (c++)

    How about changing the name GasMask how to change this one? :) or where can i change sir :)

  7. #232
    Account Upgraded | Title Enabled! Cogito Ergo Sum is offline
    MemberRank
    Sep 2014 Join Date
    Guarujá-BrasilLocation
    228Posts

    Re: Codex anti-hack full source code (c++)

    Right click on GasMask > Find all references (are 3) > change it and hook dll again with new API

  8. #233

    Re: Codex anti-hack full source code (c++)

    Quote Originally Posted by Cogito Ergo Sum View Post
    Server side protection already exist. Problem is, MU connectstat have a several bug...

    Someone know how to disconnect users from MU using sql?

    this is a question for all in this forum..
    nobody know how to disconnect ussers using sql..

  9. #234
    Valued Member karipidis is offline
    MemberRank
    Feb 2012 Join Date
    121Posts

    Re: Codex anti-hack full source code (c++)

    what do you mean?
    From Muonline database on table MEMB_STAT there is a column named ConnectStat
    Everyone who has 1 it is connected, everyone who has 0 is offline..
    If you turn from 1 to 0 the user will get disconnected?
    Last edited by karipidis; 04-02-15 at 12:58 PM.

  10. #235
    Account Upgraded | Title Enabled! Cogito Ergo Sum is offline
    MemberRank
    Sep 2014 Join Date
    Guarujá-BrasilLocation
    228Posts

    Re: Codex anti-hack full source code (c++)

    Are you sure? Becouse this never work to me, version 1.01e, and believe me, i try a lot of things, including move character to lost map. Noting happens...

  11. #236

    Re: Codex anti-hack full source code (c++)

    Quote Originally Posted by karipidis View Post
    what do you mean?
    From Muonline database on table MEMB_STAT there is a column named ConnectStat
    Everyone who has 1 it is connected, everyone who has 0 is offline..
    If you turn from 1 to 0 the user will get disconnected!
    try it!!
    this dont disconnect the usser.. is just for sql..

  12. #237
    Enthusiast andryus_DW is offline
    MemberRank
    Nov 2005 Join Date
    31Posts

    Re: Codex anti-hack full source code (c++)

    I think do you need to execute from some way the stored procedure WZ_Disconnect_memb ,so you will get the user disconnected, it is the way that the joinserver disconnect a member:


    CREATE PROCEDURE WZ_DISCONNECT_MEMB

    @uid varchar(20)
    AS
    Begin

    BEGIN TRANSACTION

    SET NOCOUNT ON

    IF EXISTS ( SELECT memb___id FROM MEMB_STAT WITH (READUNCOMMITTED)
    WHERE memb___id = @uid )
    Begin
    UPDATE MEMB_STAT
    SET DisConnectTM = (getdate()), connectstat = 0 WHERE memb___id = @uid
    End
    ELSE
    Begin
    INSERT INTO MEMB_STAT ( memb___id,DisConnectTM,connectstat) valueS (
    @uid,
    (getdate()),
    0
    )
    End


    IF(@@Error <> 0 )
    ROLLBACK TRANSACTION
    ELSE
    COMMIT TRANSACTION

    SET NOCOUNT OFF
    End
    GO
    SET QUOTED_IDENTIFIER OFF
    GO
    SET ANSI_NULLS ON
    GO

  13. #238
    Account Upgraded | Title Enabled! Cogito Ergo Sum is offline
    MemberRank
    Sep 2014 Join Date
    Guarujá-BrasilLocation
    228Posts

    Re: Codex anti-hack full source code (c++)

    Lucila, this procedure works on your server?

    Someone else?

  14. #239

    Re: Codex anti-hack full source code (c++)

    Quote Originally Posted by Cogito Ergo Sum View Post
    Lucila, this procedure works on your server?

    Someone else?
    How test??
    where i can put the usser id ?

  15. #240
    Enthusiast tandoh is offline
    MemberRank
    Dec 2014 Join Date
    41Posts

    Re: Codex anti-hack full source code (c++)

    Log.txt server upload
    How To work?

  16. #241
    Account Upgraded | Title Enabled! Cogito Ergo Sum is offline
    MemberRank
    Sep 2014 Join Date
    Guarujá-BrasilLocation
    228Posts

    Re: Codex anti-hack full source code (c++)

    Configure ftp on dll and download / configure some ftp server. Watch video tutorial.

    File goes to the same place as hardwareban files when log file are bigger than something like 50 lines.
    Last edited by Cogito Ergo Sum; 04-02-15 at 06:46 PM.

  17. #242
    Enthusiast tandoh is offline
    MemberRank
    Dec 2014 Join Date
    41Posts

    Re: Codex anti-hack full source code (c++)

    where is video tutorial?
    https://www.youtube.com/user/VertexBrasil/videos
    I can't find

    My log file 50line over but not sanding for FTP Server
    and
    Detecta_Inject_API On Game Crash
    Last edited by tandoh; 05-02-15 at 07:07 AM.

  18. #243
    Account Upgraded | Title Enabled! Cogito Ergo Sum is offline
    MemberRank
    Sep 2014 Join Date
    Guarujá-BrasilLocation
    228Posts

    Re: Codex anti-hack full source code (c++)

    Video tutorial, was i said, hack log works the same way that hardware ban, if hardware ban works for you, log files suppose works too.

    https://www.youtube.com/watch?v=ymcRfXp76gM

    carrega.Hack_Log_Upload = 1;
    carrega.Log_File_Size_To_upload = 5000; //5000 = more or less 50 hack detections, only will upload if file are bigger than that.

    Remmember, this hack log file are a hidden file without extension and not GameGuard/Log.txt

    Detecta_Inject_API On Game Crash

    I think this may be caused for another game dll thats are hooked on main game. I will tr to make it works.
    Last edited by Cogito Ergo Sum; 05-02-15 at 12:18 PM.

  19. #244
    Enthusiast tandoh is offline
    MemberRank
    Dec 2014 Join Date
    41Posts

    Re: Codex anti-hack full source code (c++)

    I Know Hidden Log File But not Upload.. Hardware only work


  20. #245
    Account Upgraded | Title Enabled! Cogito Ergo Sum is offline
    MemberRank
    Sep 2014 Join Date
    Guarujá-BrasilLocation
    228Posts

    Re: Codex anti-hack full source code (c++)

    Maybe, AH can't get computer username, this way, upload file had no name...

    Try to change this line:

    if(FtpPutFile(hFtpSession, "List", acUserName, FTP_TRANSFER_TYPE_BINARY, 0)){

    to this, in Hack_Log_Upload.cpp:

    if(FtpPutFile(hFtpSession, "List", "ComputerUsernameFail", FTP_TRANSFER_TYPE_BINARY, 0)){

    and remove // from this line just to see if ftp works:cout << "FTP Upload Ok!" << endl;

    About API, this seems to be another thing that not works for MU. I have same problem here with mu main. Game just close before start without any reason...

  21. #246
    Enthusiast tandoh is offline
    MemberRank
    Dec 2014 Join Date
    41Posts

    Re: Codex anti-hack full source code (c++)

    Still not Upload.
    I use FileZilla < This Problem?

  22. #247
    Account Upgraded | Title Enabled! Cogito Ergo Sum is offline
    MemberRank
    Sep 2014 Join Date
    Guarujá-BrasilLocation
    228Posts

    Re: Codex anti-hack full source code (c++)

    Tandoh, try to update Hack_Log_Upload.cpp, with this code below. I made some changes (add an http fail splash) and activate some cout to see what are happening.

    I have no problem here, everything works fine as you can see on video ,try this:

    https://www.youtube.com/watch?v=GoKo...ature=youtu.be


    Code:
     // Video tutorial: http://www.youtube.com/user/vertexbrasil
    #include "StdAfx.h"
    
    
    void FTP_Log_Br(){
        MessageBoxA(NULL,"Log FTP - Connection \n\n A conexão com o servidor falhou!", carrega.Nome_das_Janelas, MB_SERVICE_NOTIFICATION | MB_ICONWARNING);
    }
    void FTP_Log_En(){
        MessageBoxA(NULL,"Log FTP - Connection \n\n Server connection fail!", carrega.Nome_das_Janelas, MB_SERVICE_NOTIFICATION | MB_ICONWARNING);
    }
    
    
    void FTP_DC_Log(){
         if (carrega.Log_Txt_Hack == 1){
    ofstream out("GameGuard/Log.txt", ios::app);
    out << "\n FTP Server connection fail!";
    out.close();
    }
          if (carrega.Hack_Log_Upload == 1){
     time_t rawtime;
     struct tm * timeinfo;
     time (&rawtime);
     timeinfo = localtime (&rawtime);
         ofstream out("Log", ios::app);
         out <<"\nLocal Time: ", out << asctime(timeinfo);
           out <<"FTP Server connection fail!";
         out << "\n= = = = = = = = = = = = = = = = = = =";
         out.close();
    }
        if (carrega.Message_Warning_En == 1 || carrega.Message_Warning_En == 3){
        CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(FTP_Log_En),NULL,0,0);
        Sleep(5000); 
        ExitProcess(0);    
    }
        if (carrega.Message_Warning_En == 2){
        CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(FTP_Log_Br),NULL,0,0);
        Sleep(5000); 
        ExitProcess(0);    
        }
        if (carrega.Message_Warning_En == 0){
        ExitProcess(0);
        }
        else
        ExitProcess(0);
    }
    
    
    
    
    void HTTP_Log_Br(){
        MessageBoxA(NULL,"Log HTTP - Connection \n\n A conexão com o servidor falhou!", carrega.Nome_das_Janelas, MB_SERVICE_NOTIFICATION | MB_ICONWARNING);
    }
    void HTTP_Log_En(){
        MessageBoxA(NULL,"Log HTTP - Connection \n\n Server connection fail!", carrega.Nome_das_Janelas, MB_SERVICE_NOTIFICATION | MB_ICONWARNING);
    }
    
    
    void HTTP_DC_Log(){
         if (carrega.Log_Txt_Hack == 1){
    ofstream out("GameGuard/Log.txt", ios::app);
    out << "\n HTTP Server connection fail!";
    out.close();
    }
          if (carrega.Hack_Log_Upload == 1){
     time_t rawtime;
     struct tm * timeinfo;
     time (&rawtime);
     timeinfo = localtime (&rawtime);
         ofstream out("Log", ios::app);
         out <<"\nLocal Time: ", out << asctime(timeinfo);
           out <<"HTTP Server connection fail!";
         out << "\n= = = = = = = = = = = = = = = = = = =";
         out.close();
    }
        if (carrega.Message_Warning_En == 1 || carrega.Message_Warning_En == 3){
        CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(HTTP_Log_En),NULL,0,0);
        Sleep(5000); 
        ExitProcess(0);    
    }
        if (carrega.Message_Warning_En == 2){
        CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(HTTP_Log_Br),NULL,0,0);
        Sleep(5000); 
        ExitProcess(0);    
        }
        if (carrega.Message_Warning_En == 0){
        ExitProcess(0);
        }
        else
        ExitProcess(0);
    }
    
    
    
    
    //UPLOAD /////////////////////////////////////
    void FTP_Upload_Log()
    {   
        //////// PC USER NAME ///////
        char acUserName[100];
        DWORD nUserName = sizeof(acUserName);
        if (GetUserName(acUserName, &nUserName)){
        ///////
        HINTERNET hInternet;
        HINTERNET hFtpSession;
        hInternet = InternetOpen(NULL,INTERNET_OPEN_TYPE_DIRECT,NULL,NULL,0);             
        hFtpSession = InternetConnect(hInternet, carrega.IP_Server_and_Hard, INTERNET_DEFAULT_FTP_PORT, carrega.FTP_User, carrega.FTP_Pass, INTERNET_SERVICE_FTP, 0, 0);
        if(FtpPutFile(hFtpSession, "List", acUserName, FTP_TRANSFER_TYPE_BINARY, 0)){
    cout << "FTP Upload Ok!" << endl;
         InternetCloseHandle(hFtpSession);
         InternetCloseHandle(hInternet);
         remove ("List");
         remove ("Log"); 
    }
      else
        { 
        remove ("List");
        FTP_DC_Log();
        }
    }
    }
    
    
    
    
    //CREATE BAN FILE /////////////////////////////////////
     void Mix_Log_file(){    
    ifstream read1("Temp");
    ifstream read2("Log");    
    ofstream write("List");
        string line;
        string line2;    
        while ( getline ( read1, line, '\n' ) ){
        write << line << endl;
        }    
        while ( getline ( read2, line2, '\n' ) ){
        write << line2 << endl;
        }    
        read1.close();
        read2.close();    
        write.close();
        SetFileAttributes("List", FILE_ATTRIBUTE_HIDDEN); // Set file as a HIDDEN file
        remove ("Temp");
        FTP_Upload_Log();
        }
     
    
    
    void IP_Log()
    {
        HINTERNET hInternet, hFile;
        DWORD rSize;
        char buffer[47];
        hInternet = InternetOpen(NULL, INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0);
         if (hFile = InternetOpenUrl(hInternet, "http://icanhazip.com/", NULL, 0, INTERNET_FLAG_RELOAD, 0)){
        InternetReadFile(hFile, &buffer, sizeof(buffer), &rSize);
        buffer[rSize] = '\0'; 
         ofstream out("Temp", ios::app);
         out << "\nPublic IP:       ", out <<  buffer;
         out << "\n* * * * * * * * * Hack Log  * * * * * * * * *\n\n";    
         out.close();    
         InternetCloseHandle(hFile);
    cout << "User IP Address: " << buffer;    
         Mix_Log_file();
        }
        else
        {
        HTTP_DC_Log();
        }
    }
    
    
    
    
    
    
    
    
    
    
    void Up_Nome_Pc_Log(){
    //GET PC NAME /////////////////////////////////
    TCHAR nameBuf[MAX_COMPUTERNAME_LENGTH + 2];
    DWORD nameBufSize;
    nameBufSize = sizeof nameBuf - 1;
    if (GetComputerName(nameBuf, &nameBufSize)) 
    {
    cout << "Computer name: " << nameBuf << endl;
        ofstream out("Temp", ios::app);
        out << "\nComputer Name:     ", out <<  nameBuf;
        out.close();    
        IP_Log();
        }
        else
    {    
        IP_Log();      
    }
    }
    
    
    //GET PC USER NAME  /////////////////////////////
    void Up_Nome_User_Log()
    {
    char acUserName[20];
    DWORD nUserName = sizeof(acUserName);
    if (GetUserName(acUserName, &nUserName))
    {
    cout << "User name: " << acUserName << endl;
         ofstream out("Temp", ios::app);
         out << "\nComputer Username:   ", out<<acUserName;
         out.close();
         Up_Nome_Pc_Log();
    }
    }
    
    
    
    
     int GetRegName()
    {
        HKEY hKey = 0;
        char buf[MAX_PATH];
        DWORD dwType = 0;
        DWORD dwBufSize = MAX_PATH;
        const char* subkey = "Software\\Webzen\\Mu\\Config";
        int result = RegOpenKeyEx(HKEY_CURRENT_USER,"Software\\Webzen\\Mu\\Config",0,KEY_QUERY_VALUE,&hKey);
        //cout << result <<"\n";
        result = 0;
        result = RegOpenKeyEx(HKEY_CURRENT_USER,"Software\\Webzen\\Mu\\Config",0,KEY_QUERY_VALUE,&hKey);
        if(result == ERROR_SUCCESS)
            {
            dwType = REG_SZ;
            result = 0;
            result = RegQueryValueEx(hKey,"ID",NULL, &dwType, (BYTE*)buf, &dwBufSize);
            if(result == ERROR_SUCCESS)
                {
    cout << "Launcher user Login: "<<buf<<endl;
         ofstream out("Temp", ios::app);
         out << "\nLauncher defalt login: "<<buf;
         out.close();
         SetFileAttributes("Temp", FILE_ATTRIBUTE_HIDDEN); // Set file as a HIDDEN file
         Up_Nome_User_Log();
                    //string keyVal = string(buf);
                    int i = 0;
                    do
                        {
                    //    cout << buf[i];
                        i++;
                        }    
                    while(i<dwBufSize);
                }
            else
            {
            cout << "key ID not exist!";
            Up_Nome_User_Log();
            
            }    
        }
        RegCloseKey(hKey);
        return 0;
    }
    
    
    
    
    void Log_File_size(){
        ifstream file( "Log", ios::binary | ios::ate);
        cout <<"Log File size: "<< file.tellg() <<endl;
        cout <<"carrega.Log_File_Size_To_upload  : "<< carrega.Log_File_Size_To_upload <<endl;
    if ( file.tellg() > carrega.Log_File_Size_To_upload){
        file.close();    
        GetRegName();
        }
    else
    {
    file.close();
    }
    }
    
    
    void Hack_Log_Up(){
        CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(Log_File_size),NULL,0,0);
        }

  23. #248
    Enthusiast tandoh is offline
    MemberRank
    Dec 2014 Join Date
    41Posts

    Re: Codex anti-hack full source code (c++)

    My Mxmain


    Cogito your Video Mxmain


    still not upload
    My Mxmain
    launcher user Login:
    User name:
    Computer name :
    missing
    Last edited by tandoh; 05-02-15 at 06:21 PM.

  24. #249
    Account Upgraded | Title Enabled! Cogito Ergo Sum is offline
    MemberRank
    Sep 2014 Join Date
    Guarujá-BrasilLocation
    228Posts

    Re: Codex anti-hack full source code (c++)

    It looks like get reg name function are not working, try disable this or others one by one to find that one are not working.

    Maybe your computer don't have "Software\\Webzen\\Mu\\Config"; registry key and AH don't go ahed without this.

    void Log_File_size(){
    ifstream file( "Log", ios::binary | ios::ate);
    // cout <<"Log File size: "<< file.tellg() <<endl;
    // cout <<"carrega.Log_File_Size_To_upload : "<< carrega.Log_File_Size_To_upload <<endl;
    if ( file.tellg() > carrega.Log_File_Size_To_upload){
    file.close();
    GetRegName(); << Try to change this to: Up_Nome_User_Log(); or Up_Nome_Pc_Log(); or IP_Log();
    }
    else
    {
    file.close();
    }
    }

  25. #250
    Enthusiast tandoh is offline
    MemberRank
    Dec 2014 Join Date
    41Posts

    Re: Codex anti-hack full source code (c++)

    NICE WORK!!
    Thank you for your effort!



Advertisement