Results 1 to 15 of 15
  1. #1
    Frought's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Location
    In the dark island
    Posts
    3,403
    Reputation
    156
    Thanks
    5,980
    My Mood
    Cool

    Cool Basic Console Application


    Don't ask me what is this .
    -----------
    You must know C++ to understand the code.
    -----------------
    Code:
    #include <iostream>
     #include <windows.h>
     #include <string>
     #include <tlhelp32.h>
    #include <tchar.h> 
    #pragma comment(lib, "User32.lib")
    #define pointer 0xFA1500
        //Code
    
    
    using namespace std;
    
    
     DWORD dwGetModuleBaseAddress(DWORD dwProcessIdentifier, TCHAR *lpszModuleName)
    {
       HANDLE hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, dwProcessIdentifier);
       DWORD dwModuleBaseAddress = 0;
       if(hSnapshot != INVALID_HANDLE_VALUE)
       {
          MODULEENTRY32 ModuleEntry32 = {0};
          ModuleEntry32.dwSize = sizeof(MODULEENTRY32);
          if(Module32First(hSnapshot, &ModuleEntry32))
          {
             do
             {
                if(_tcscmp(ModuleEntry32.szModule, lpszModuleName) == 0)
                {
                   dwModuleBaseAddress = (DWORD)ModuleEntry32.modBaseAddr;
                   break;
                }
             }
             while(Module32Next(hSnapshot, &ModuleEntry32));
          }
          CloseHandle(hSnapshot);
       }
       return dwModuleBaseAddress;
    } 
    int main()  
    {   
        SetConsoleTitleA("Nickname Changer");
        clog << "Made by [D]opeDog" << endl;
        HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
        SetConsoleTextAttribute(hConsole, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY | COMMON_LVB_UNDERSCORE);
       HWND hWnd = FindWindow(0, _T("Alliance of Valiant Arms"));
       if(hWnd == 0)
       {
          cerr << "Unable to find the window" << endl;
       }
       else{
      clog << "Found Window" << endl;
      DWORD dwPId = 0;
      DWORD dwprocessID = GetWindowThreadProcessId(hWnd, &dwPId);
      HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, dwPId);
      if (!hProcess){
      cerr << "Unable to Open Process" << endl;
      }
      else{
      clog << "Opened Process" << endl; 
     wchar_t newvalue[255];
      DWORD dwPointed;
      DWORD dwGameOffset = dwGetModuleBaseAddress(dwPId, _T("AVA.exe")); 
     ReadProcessMemory(hProcess, (LPCVOID)(dwGameOffset+pointer), &dwPointed, sizeof(wchar_t*), NULL); 
     dwPointed+=0x90;
     ReadProcessMemory(hProcess, (LPCVOID)dwPointed, &dwPointed, sizeof(wchar_t*), NULL); 
     dwPointed+=0x24;
      clog << "Enter the new nickname: ";
      wcin >> newvalue;
      if(WriteProcessMemory(hProcess, (LPVOID)dwPointed, &newvalue, sizeof(wchar_t*), NULL)){
      clog << "Process Memory Written" << endl;
      CloseHandle(hProcess); 
      }else{
      clog << "Couldn't write process memory." << endl;
      }
      }
       }
     char cls;
     cout << "Wanna change the Nickname again? (y) or (n)" << endl;
     cin >> cls;
     while(cls){
     switch(cls){
     case 'y':  
     system("CLS");
     return main();
     break;
     case 'n':
     return 0;
     break;
     case 'Y':
     system("CLS");
     return main();
     break;
     case 'N':
    return 0;
     default:
     return 0;
     break;
     }
     }
     system("PAUSE");
    return main();
    }

    ------------------
    I will explain it now:
    Code:
    DWORD dwGetModuleBaseAddress(DWORD dwProcessIdentifier, TCHAR *lpszModuleName)
    {
       HANDLE hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, dwProcessIdentifier);
       DWORD dwModuleBaseAddress = 0;
       if(hSnapshot != INVALID_HANDLE_VALUE)
       {
          MODULEENTRY32 ModuleEntry32 = {0};
          ModuleEntry32.dwSize = sizeof(MODULEENTRY32);
          if(Module32First(hSnapshot, &ModuleEntry32))
          {
             do
             {
                if(_tcscmp(ModuleEntry32.szModule, lpszModuleName) == 0)
                {
                   dwModuleBaseAddress = (DWORD)ModuleEntry32.modBaseAddr;
                   break;
                }
             }
             while(Module32Next(hSnapshot, &ModuleEntry32));
          }
          CloseHandle(hSnapshot);
       }
       return dwModuleBaseAddress;
    }
    This function is used to find the base address , but as usually AVA's base address is 0x400000 , If you're using it in another game this might be different so this is useful in it.
    --------------------
    Code:
     HWND hWnd = FindWindow(0, _T("Alliance of Valiant Arms"));
    In this code we find AVA window so we check if AVA is opened , If it is ; we will get its process id.
    -------------------------
    Code:
     DWORD dwPId = 0;
      DWORD dwprocessID = GetWindowThreadProcessId(hWnd, &dwPId);
      HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, dwPId);
    dwPid is the process Id variable which we will store the process id for AVA in it.
    GetWindowThreadProcessId is getting the pid from the AVA window and store it in the variable dwPId.
    OpenProcess is going to open AVA's memory so we get access to the memory to read/write.
    -------------------------------
    Code:
    ReadProcessMemory(hProcess, (LPCVOID)(dwGameOffset+pointer), &dwPointed, sizeof(wchar_t*), NULL); 
     dwPointed+=0x90;
     ReadProcessMemory(hProcess, (LPCVOID)dwPointed, &dwPointed, sizeof(wchar_t*), NULL); 
     dwPointed+=0x24;
    ReadProcessMemory is reading the pointer/address from AVA's memory which we opened in hProcess , then It read it ...
    Q:Why do we read it , why is it useful? If we have a pointer , a pointer points to a point and the point+offset points to another point ... so how could the ReadProcessMemory get all of this?
    We do that , first we read the pointer to get the point it points to , then we calculate the point to the offset to get the another point ... depends on how many offsets you have .. in this pointer I have 2 offsets , so I will read the pointer 2 times to get each point and add it to the offset .
    So , If you didn't understand it , I will give you an example:
    We have a pointer with offsets , it will look like this : Pointer->(Point+Offset)->(Point+Offset2) , and so on... depends on how many offsets you have.
    so the steps on this ReadProcessMemory is :
    Code:
    ReadProcessMemory(hProcess, (LPCVOID)(dwGameOffset+pointer), &dwPointed, sizeof(wchar_t*), NULL); 
    dwPointed+=0x90;
    hProcess : give us access to memory and we can read/write in it.
    (LPCVOID)(dwGameOffset+pointer) : (LPCVOID) is not good to know what is it now but It is a must in ReadProcessMemory , (dwGameOffset+pointer) here we calculate the game offset which is 0x400000 and the pointer which we defined to give us the pointer .
    &dwPointed : in this case we store the pointer which we've got in dwPointed .
    sizeof(wchar_t*) : the size of it 4 bytes for 4 bytes pointers and wchar_t for unicode strings .
    NULL = 0 .
    dwPointed+=0x90;
    we stored the pointer in the first read of the pointer , so we add the offset to the pointer which we've stored and so on ... so If you have 4 offsets you have to use ReadProcessMemory 4 times .

    Code:
    if(WriteProcessMemory(hProcess, (LPVOID)dwPointed, &newvalue, sizeof(wchar_t*), NULL)){
      clog << "Process Memory Written" << endl;
      CloseHandle(hProcess);
    we used if in writeprocessmemory function because It is a bool , If succeed return non-zero , If it failed return zero , same with readprocessmemory.
    CloseHandle(hProcess);
    Now we have no access or no opened memory in the program ..
    ---------------------------
    Now If you have any problem tell me .

  2. The Following 6 Users Say Thank You to Frought For This Useful Post:

    awesomeduke2000 (06-26-2013),dhodsnette (07-01-2013),Elidonn (07-01-2013),[MPGH]Mayion (07-01-2013),PPCINJ (06-26-2013),ySoNoob (07-02-2013)

  3. #2
    bollafa's Avatar
    Join Date
    Jun 2013
    Gender
    male
    Posts
    19
    Reputation
    10
    Thanks
    2
    My Mood
    Dead

    Smile Thx For Your Post (again)!!!

    Hyper-cool thx you very much for this code, btw how did you find the pointers and offsets if Olly Dbg and Cheat Engine are detected?


    Cool a nickname changer , Thx you again.(I'm still asking how did you found the pointers )
    Last edited by bollafa; 07-01-2013 at 10:32 AM. Reason: Thx For Your Post!!!

  4. #3
    Frought's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Location
    In the dark island
    Posts
    3,403
    Reputation
    156
    Thanks
    5,980
    My Mood
    Cool
    Quote Originally Posted by bollafa View Post
    Hyper-cool thx you very much for this code, btw how did you find the pointers and offsets if Olly Dbg and Cheat Engine are detected?


    Cool a nickname changer , Thx you again.(I'm still asking how did you found the pointers )
    Bypass.
    /10 char

  5. #4
    bollafa's Avatar
    Join Date
    Jun 2013
    Gender
    male
    Posts
    19
    Reputation
    10
    Thanks
    2
    My Mood
    Dead
    Quote Originally Posted by [D]opeDog View Post

    Bypass.
    /10 char
    /10 char wtf? ( i dont know what are you refering to) you did your own bypass or you bought it? (or downloaded one)?

  6. #5
    PandaBanda's Avatar
    Join Date
    Mar 2013
    Gender
    male
    Location
    The secret Land of AvA
    Posts
    188
    Reputation
    18
    Thanks
    368
    My Mood
    Amazed
    There are no bypass to buy... He made it by himself!
    Quote Originally Posted by bollafa View Post
    /10 char wtf? ( i dont know what are you refering to) you did your own bypass or you bought it? (or downloaded one)?

  7. #6
    wGRWGHWGRERGrgergergrg's Avatar
    Join Date
    Jun 2012
    Gender
    female
    Posts
    495
    Reputation
    16
    Thanks
    1,363
    My Mood
    Tired
    Quote Originally Posted by PandaBanda View Post
    There are no bypass to buy... He made it by himself!
    or someone share it with him

  8. The Following 3 Users Say Thank You to wGRWGHWGRERGrgergergrg For This Useful Post:

    ccman32 (07-01-2013),dhodsnette (07-01-2013),zZzeta/S (07-01-2013)

  9. #7
    dhodsnette's Avatar
    Join Date
    Jun 2013
    Gender
    male
    Location
    onlinegamehacking.******.***
    Posts
    46
    Reputation
    10
    Thanks
    34
    My Mood
    Cool
    thank you for sharing. it works I compile with vs c++ 6.0

  10. #8
    Frought's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Location
    In the dark island
    Posts
    3,403
    Reputation
    156
    Thanks
    5,980
    My Mood
    Cool
    Quote Originally Posted by MarvLie View Post
    or someone share it with him
    Yeah , someone shared it with me and I made it better way than him... @Riddick , you hear , right?

  11. #9
    PandaBanda's Avatar
    Join Date
    Mar 2013
    Gender
    male
    Location
    The secret Land of AvA
    Posts
    188
    Reputation
    18
    Thanks
    368
    My Mood
    Amazed
    Yea maybe someone shared it with him, but i think he is good enough to create his own bypass!
    Quote Originally Posted by MarvLie View Post
    or someone share it with him

  12. #10
    PPCINJ's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Location
    NRF
    Posts
    317
    Reputation
    10
    Thanks
    1,676
    My Mood
    Innocent
    Quote Originally Posted by [D]opeDog View Post

    Yeah , someone shared it with me and I made it better way than him... @Riddick , you hear , right?
    Isn't it the way with two computers i gave you?





  13. #11
    Frought's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Location
    In the dark island
    Posts
    3,403
    Reputation
    156
    Thanks
    5,980
    My Mood
    Cool
    Quote Originally Posted by PPCINJ View Post
    Isn't it the way with two computers i gave you?
    No ... Riddick gave it to me first , then I made it better than riddick's no need for users.
    Anyway in the next way I won't be using CE since I will use SDK , just still learning.

  14. #12
    wGRWGHWGRERGrgergergrg's Avatar
    Join Date
    Jun 2012
    Gender
    female
    Posts
    495
    Reputation
    16
    Thanks
    1,363
    My Mood
    Tired
    Quote Originally Posted by [D
    opeDog;8392869] I will use SDK
    i heard its very difficult?

    @PPCINJ watch out i learn c# there will be 1 more macromaker soon

    edit fail quote O.o
    Last edited by wGRWGHWGRERGrgergergrg; 07-02-2013 at 03:15 PM.

  15. #13
    PPCINJ's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Location
    NRF
    Posts
    317
    Reputation
    10
    Thanks
    1,676
    My Mood
    Innocent
    You will never reach my level of 1337 H4X0R Pr0gr4mm3r.





  16. #14
    shiubro99:D's Avatar
    Join Date
    Jul 2013
    Gender
    male
    Location
    England
    Posts
    78
    Reputation
    18
    Thanks
    440
    My Mood
    Amazed
    Can some1 explain to me how do I use a dll for an injector on AVA, more on, how to get the code, then browse pls help URGENT!

  17. #15
    211070's Avatar
    Join Date
    Jul 2012
    Gender
    male
    Location
    At the forums
    Posts
    1,023
    Reputation
    10
    Thanks
    78
    Quote Originally Posted by shiubro99:D View Post
    Can some1 explain to me how do I use a dll for an injector on AVA, more on, how to get the code, then browse pls help URGENT!
    Go look for online lessons, or go to school somewhere. You select the dll within the injector and click inject . Compile source code above and you got yourself a namechanger.

Similar Threads

  1. [Release] PlayTheGame ~ The console application!
    By VvITylerIvV in forum C++/C Programming
    Replies: 9
    Last Post: 06-03-2011, 09:20 AM
  2. [TuT] You First C++ Console Application
    By sam22 in forum Programming Tutorials
    Replies: 6
    Last Post: 11-30-2010, 07:56 PM
  3. C++, Making a Console Application
    By -:TKK:-WaSsUp in forum C++/C Programming
    Replies: 7
    Last Post: 10-26-2010, 05:38 AM
  4. C++ console application
    By VvITylerIvV in forum C++/C Programming
    Replies: 39
    Last Post: 08-04-2010, 05:08 AM
  5. What's the point of Console applications?
    By 258456 in forum C++/C Programming
    Replies: 2
    Last Post: 06-05-2010, 03:22 PM