Results 1 to 6 of 6
  1. #1
    radnomguywfq3's Avatar
    Join Date
    Jan 2007
    Gender
    male
    Location
    J:\E\T\A\M\A\Y.exe
    Posts
    8,858
    Reputation
    381
    Thanks
    1,823
    My Mood
    Sad

    -_- Why does 'Working' Keep getting set to false.

    I don;t understand, The boolean 'Working' is set to true when warrock opens,and when its closed its set to false. The most fucked up part is when I press a key(a) to activate the hack, 'Working' is set to false. And I don't understand why the fuck it is. I programmed this by-myself and I am 100% sure there are only like no spots in which it turns false because a hotkey is pressed. Here. Ignore the comments, there there to keep me on track, Its not my first time programming C++, just my first time making a hack with it.

    Code:
    #define ProcessName
    #include <cstdlib>
    #include <iostream>
    #include <string>
    #include <windows.h>
    #include <conio.h>
    #include <dos.h>
    #include <tlhelp32.h>
    #include <stdio.h>
    #include <stdlib.h>
    
    using namespace std;
    bool WarrockFound = false;
    HANDLE WarRockProcess = NULL;
    bool Working = false;
    bool InfStem = false;
    bool ScopeOn = false;
    long Temp;
    char ReturnKey = '0';
    long StemWrite = 1120403456;
    LPVOID ScopeAddress = (void*) 0x00AB7E22;
    LPVOID StemAddress = (void*) 0x008B9B04;
    
    HANDLE GetProcess(void){
         bool TempBool = false;
         HANDLE ProcessSnap;
         PROCESSENTRY32 ProcessInformation;
         //Process Handle in Gen Declaration section
         ProcessSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
         Process32First(ProcessSnap, &ProcessInformation);
         //Start Find Process
         TempBool = false;
         do
         {
    
                  if(strcmp(ProcessInformation.szExeFile,"WarRock.exe") == 0)
                  {
                        TempBool = true;
                        Working = true;
                        return OpenProcess(PROCESS_ALL_ACCESS, false, ProcessInformation.th32ProcessID);
                        break;
                  }
         }while(Process32Next(ProcessSnap, &ProcessInformation));
         if(TempBool == true)
         {
                     Working = true;
         }else{
               Working = false;
         }
         //End Find Process
    }
           
    void Screen(void)
    {
         system("cls");
         cout<<"_______________[Hacks Status]____________\n"<<endl;
         if(Working == false ){cout<<"Status : Cannot Find Warrocks Process"<<endl;}else{cout<<"Status : Warrock Found"<<endl;}
         cout<<"\n\nHacks:"<<endl;
         if(ScopeOn){cout<<"Scope [Activated]\n";}else{cout<<"Scope [Unactivated]\n";}
         if(InfStem){cout<<"InfStem [Activated]\n";}else{cout<<"InfStem [Unactivated]\n";}
         
    }
    int main(int argc, char *argv[])
    {
        cout<<"Waiting For Okay.."<<endl;
        MessageBox(NULL,"Notes:\n   The twitching in the console is normal.\nIf you want to get rid of it you can increase your FrameRates.\nAnyways this hack was made with Dev-C++.\nIts better then all the VB\nHacks in the world put to gether, and you can't make fun of it! \nNor can you make fun of pokopeople Okay -_-\n\nPlease Note The Following Changes Have Taken Place: \n-No Commands\n-Uses 'Hot Keys'\n-Includes Scope\n-Includes Light Map\n-Includes InfStem\n\nINFOMRATION :\n  Hot Keys:\n              C - Scope On\n  Shift + C - Scope Off\n              P - InfStemOn\n  Shift + P - InfStem Off\n  Shift + Q - Quite","Notice!",MB_OK);
        while(true)
        {
                   Screen();
                   GetProcess();
                   //Check For Local Key Presses
                   if(kbhit()){ReturnKey = getch();}
                   if(ReturnKey == 'Q'){return 0;}
                   WarRockProcess = GetProcess();
                   //Check Find Status
                   if(Working == true)
                   {
                         GetProcess();
                         Screen();
                        //Write Process Memory Start Below
                        if(InfStem){WriteProcessMemory(WarRockProcess,StemAddress,&StemWrite,4,NULL);}
                                            
                        //True\False KeyPress Start Below
                        if(kbhit()){
                        ReturnKey = getch();
                              switch(ReturnKey){             
                                case 'a':
                                       Temp = 1;
                                       ScopeOn = true;
                                       WriteProcessMemory(WarRockProcess,ScopeAddress,&Temp,4,NULL);
                                       //OnScope
                                       break;
                                case 'b':
                                     Temp = 0;
                                     ScopeOn = false;
                                     WriteProcessMemory(WarRockProcess,ScopeAddress,&Temp,4,NULL);
                                     //OffScope
                                     break;
                                case 'c':
                                     InfStem = false;
                                     break;
                                case 'd':
                                     InfStem = true;
                                     break;
                                }
                        }
                   }//End If Working..
        }
    }



    There are two types of tragedies in life. One is not getting what you want, the other is getting it.

    If you wake up at a different time in a different place, could you wake up as a different person?


  2. #2
    Credzis's Avatar
    Join Date
    May 2007
    Gender
    male
    Posts
    180
    Reputation
    11
    Thanks
    555
    My Mood
    Stressed
    Hmm, maybe use int instead of bool.

    So if ( ScopeOn == 1 )
    activatemyleathack();

    Try that.
    I have to say i never use cases.
    I more like if and else so i cant tell u if the case would do anyting about it but i dont think so, it will be the same.
    And a question, why do u do this :
    Code:
         cout<<"_______________[Hacks Status]____________\n"<<endl;
    Why u use "\n" for a new line and then use endl ?
    Ok, its the same but ... why not "\n\n"

    And the namespace, use printf instead of cout...
    Dunno why, but cout looks so nooby xD

  3. #3
    radnomguywfq3's Avatar
    Join Date
    Jan 2007
    Gender
    male
    Location
    J:\E\T\A\M\A\Y.exe
    Posts
    8,858
    Reputation
    381
    Thanks
    1,823
    My Mood
    Sad
    Case statments are much better then ifs if your doing multiple choice, you should learn to get into that habbit.


    Because I learned to program in the language using cout<<, and the '<<endl;' has become a habit.
    Last edited by radnomguywfq3; 11-21-2007 at 04:30 PM.



    There are two types of tragedies in life. One is not getting what you want, the other is getting it.

    If you wake up at a different time in a different place, could you wake up as a different person?


  4. #4
    AlexSleyore's Avatar
    Join Date
    Sep 2007
    Posts
    44
    Reputation
    10
    Thanks
    11
    same problum is happening to me... im using


    and its making NONE of my hacks work anymore


    bool EditMem(const char * ProcessName, LPVOID MemAddress, int NewVal, int size)
    {
    HANDLE hProcessSnap;
    HANDLE hProcess = NULL;
    PROCESSENTRY32 pe32;
    hProcessSnap = CreateToolhelp32Snapshot( TH32CS_SNAPPROCESS, 0 );
    pe32.dwSize = sizeof( PROCESSENTRY32 );
    Process32First(hProcessSnap, &pe32);
    cout<<"1";
    do
    {
    if(!strcmp(pe32.szExeFile, ProcessName))
    {
    hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pe32.th32ProcessID);
    cout<<"2";
    break;
    }
    }
    while(Process32Next(hProcessSnap, &pe32));
    CloseHandle( hProcessSnap );
    cout<<"3";
    if(hProcess != NULL)
    {
    WriteProcessMemory(hProcess, MemAddress, &NewVal, size, NULL); // write the value
    cout<<"4";
    CloseHandle(hProcess);
    return true;
    }
    else
    {cout<<"process = null";}
    return false;
    }



    (the text was so i could find the error...)

  5. #5
    radnomguywfq3's Avatar
    Join Date
    Jan 2007
    Gender
    male
    Location
    J:\E\T\A\M\A\Y.exe
    Posts
    8,858
    Reputation
    381
    Thanks
    1,823
    My Mood
    Sad
    Put code tags around that. With the indentation of the code, and i'll fix it for you.



    There are two types of tragedies in life. One is not getting what you want, the other is getting it.

    If you wake up at a different time in a different place, could you wake up as a different person?


  6. #6
    Credzis's Avatar
    Join Date
    May 2007
    Gender
    male
    Posts
    180
    Reputation
    11
    Thanks
    555
    My Mood
    Stressed
    Other question then, why do u use cmd line ?

Similar Threads

  1. help i keep getting this error
    By <sniper> in forum Hardware & Software Support
    Replies: 0
    Last Post: 10-29-2007, 05:13 PM
  2. Why Does Everyone say there is a HW Ban?
    By wwechamp in forum WarRock - International Hacks
    Replies: 8
    Last Post: 06-25-2007, 01:12 AM
  3. Why does Mpgh keep crashing?
    By mike3667 in forum General
    Replies: 9
    Last Post: 06-23-2007, 01:23 AM
  4. i keep getting this
    By NetNavi in forum WarRock - International Hacks
    Replies: 20
    Last Post: 05-26-2007, 10:39 AM