Simple Chickenhack with c++ sourcecode menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    Dragonef22's Avatar Contributor
    Reputation
    178
    Join Date
    Jan 2011
    Posts
    252
    Thanks G/R
    0/3
    Trade Feedback
    4 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Simple Chickenhack with c++ sourcecode

    hey guys

    I made a small PoE chickenhack in c++, made it mainly for learning purpose, hope it has some use for you

    Updated on 05.07.2013



    Executable: http://speedy.sh/J5WAC/Chickenhack.exe

    You can download any free c++IDE (devc++ for example) and compile the following sourcecode by yourself

    Code:
    #include <Windows.h>
    #include <iostream>
    #include <tlhelp32.h>
    #include <string.h>
    #include <sstream>
    
    using namespace std;
    
    DWORD modulebase=0;
    HANDLE mainwindow=0;
    HANDLE hopen=0;
    
    int maxpossiblevalue=0;
    int currentlife=0;
    
    HANDLE prozessauf();
    DWORD GetModuleBase(LPSTR lpModuleName);
    DWORD getadr(DWORD address, HANDLE hopen);
    void setadr(DWORD address, int value, HANDLE hopen);
    int getlife(DWORD modulebase, HANDLE hopen, DWORD offset0, DWORD offset1,DWORD offset2, DWORD offset3, DWORD offset4,DWORD offset5);
    string lifecheck();
    
    
    //Converting the life integer I get from "getlife" to a string
    string convertInt(int number)
    {
       stringstream ss;
       ss << number;
       return ss.str();
    }
    
    
    //Mainmethod
    int main()
    
    {   
        system("title PoEChickenHack by Dragonef22 V5.3 - 05.07.2013");
        system("color 1a");
       
        cout<<"Enter the maximum lifevalue your character can have before \nPoE will be closed!\n\n";
        cin>>maxpossiblevalue;      
    
        string oldresult="";
        string result="";
        
        //Looping
        while(true)
        {
                   Sleep(10);
                   result=lifecheck(); 
                   
                   //Do prevent console-spamming, we will only make a status-update if the message changed
                   if(result!=oldresult)
                   {
                                        oldresult=result;
                                        system("cls");
                                        cout<<result;
                   }            
        }      
        
    }
    
    
    
    //Check the life, returns a string with the action it did (or did not)
    string lifecheck()
    {
    
           mainwindow=FindWindow(NULL,"Path of Exile");
           
           if(mainwindow==0)
           {
                            //PoE not found - return
                            return "PoE ist not open!";
           }
           
           //Game is open, get life
           hopen=prozessauf();
           modulebase=GetModuleBase("Client.exe");
           currentlife=getlife(modulebase,hopen,0x6F701C,0x0004e8,0x000044,0x000688,0x00007c,0x0001d0); 
    
           //Life = 0 ? - User is not in a game
           if(currentlife==0)
           {
                             //User is not in a game, return
                             return "You are not in a game!";
           }
           
           //Life less than maxpossiblevalue ?
           if(currentlife<maxpossiblevalue)
           {
                             //Chicken activated, close game
                             TerminateProcess(hopen, 0); // Close window 
                             //The message won´t show up, because it will be overwritten by "PoE is not open" instantly, so we make a short sleep and change the output here
                             //The window gets closed before, so it is no problem to do that
                             system("cls");
                             cout<<"Chicken activated!! Your life was "+convertInt(currentlife)+"!";
                             Sleep(5000);
                             return "Chicken activated!! Your life was "+convertInt(currentlife)+"!";
           }
           
           //still here, so just return the current life as string
           return "Your current life is "+convertInt(currentlife)+"\n\nChicken will be activated at "+convertInt(maxpossiblevalue)+" life!";   
    }
        
    
    
    //Get the current life
    int getlife(DWORD modulebase, HANDLE hopen, DWORD offset0, DWORD offset1,DWORD offset2, DWORD offset3, DWORD offset4,DWORD offset5)
    {
          DWORD life;
          life=modulebase+offset0;
          life=getadr(life,hopen);
          life=life+offset1;
          life=getadr(life,hopen);
          life=life+offset2;
          life=getadr(life,hopen);
          life=life+offset3;
          life=getadr(life,hopen);
          life=life+offset4;
          life=getadr(life,hopen);
          life=life+offset5;
          life=getadr(life,hopen);
          
          return life;
    }  
      
    //Open an process
       
    HANDLE prozessauf() 
    
    {
        HWND hwar3=::FindWindow(NULL,"Path of Exile");
        DWORD PID, TID;
        TID = ::GetWindowThreadProcessId (hwar3, &PID);
        HANDLE hopen=OpenProcess( PROCESS_ALL_ACCESS|PROCESS_TERMINATE |PROCESS_VM_READ|
                      PROCESS_VM_WRITE,FALSE,PID);
        return hopen;
    }
    
    //Get adress of Modulename
    DWORD GetModuleBase(LPSTR lpModuleName)
    {
        DWORD dwProcessId,TID;
        HWND hwar3=::FindWindow(NULL,"Path of Exile");
        TID = ::GetWindowThreadProcessId (hwar3, &dwProcessId);
         
       MODULEENTRY32 lpModuleEntry = {0};
       HANDLE hSnapShot = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, dwProcessId);
     
       if(!hSnapShot)
          return 0;
       lpModuleEntry.dwSize = sizeof(lpModuleEntry);
       BOOL bModule = Module32First( hSnapShot, &lpModuleEntry );
       while(bModule)
       {
          if(!strcmp( lpModuleEntry.szModule, lpModuleName ) )
          {
             CloseHandle(hSnapShot);
             return (DWORD)lpModuleEntry.modBaseAddr;
          }
          bModule = Module32Next( hSnapShot, &lpModuleEntry );
       }
       CloseHandle( hSnapShot );
       return 0;
    }
    
    
    //Get value behind an adress
    DWORD getadr(DWORD address, HANDLE hopen)
    {
        int value =0;
        ReadProcessMemory(hopen,(void*)address,&value,sizeof(value),0);
        return value;
    }    
    
    //Set value of an adress
    void setadr(DWORD address, int value, HANDLE hopen)
    {
        WriteProcessMemory(hopen, (LPVOID*)(DWORD) (address), &value, sizeof(value), NULL);
        return;
    }
    Last edited by Dragonef22; 07-05-2013 at 08:00 AM.

    Simple Chickenhack with c++ sourcecode
  2. #2
    beefidus's Avatar Member
    Reputation
    1
    Join Date
    Oct 2012
    Posts
    17
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi there, there is an update ?
    ty for this great program btw !

  3. #3
    Dragonef22's Avatar Contributor
    Reputation
    178
    Join Date
    Jan 2011
    Posts
    252
    Thanks G/R
    0/3
    Trade Feedback
    4 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just need the newest pointer for the current version

    Will probably update it later

    --

    updated
    Last edited by Dragonef22; 06-26-2013 at 11:01 AM.

  4. #4
    pumbayo's Avatar Member
    Reputation
    5
    Join Date
    Jan 2012
    Posts
    128
    Thanks G/R
    0/2
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ty! very much

  5. #5
    AndyMan1987's Avatar Member
    Reputation
    1
    Join Date
    Mar 2013
    Posts
    14
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I modified it for energy shield. Make sure it is getting your correct current es before using. I am not sure how reliable my pointer will be.

    Code:
     #include <Windows.h>
    #include <iostream>
    #include <tlhelp32.h>
    #include <string.h>
    #include <sstream>
    
    using namespace std;
    
    DWORD modulebase=0;
    HANDLE mainwindow=0;
    HANDLE hopen=0;
    
    int maxpossiblevalue=0;
    int currentlife=0;
    
    HANDLE prozessauf();
    DWORD GetModuleBase(LPSTR lpModuleName);
    DWORD getadr(DWORD address, HANDLE hopen);
    void setadr(DWORD address, int value, HANDLE hopen);
    int getlife(DWORD modulebase, HANDLE hopen, DWORD offset0, DWORD offset1,DWORD offset2, DWORD offset3, DWORD offset4,DWORD offset5);
    string lifecheck();
    
    
    //Converting the life integer I get from "getlife" to a string
    string convertInt(int number)
    {
       stringstream ss;
       ss << number;
       return ss.str();
    }
    
    
    //Mainmethod
    int main()
    
    {   
        system("title PoEChickenHack by Dragonef22 edited by Andy_man for ES V5.2 - 26.06.2013");
        system("color 1a");
       
        cout<<"Enter the maximum Energy shield your character can have before \nPoE will be closed!\n\n";
        cin>>maxpossiblevalue;      
    
        string oldresult="";
        string result="";
        
        //Looping
        while(true)
        {
                   Sleep(10);
                   result=lifecheck(); 
                   
                   //Do prevent console-spamming, we will only make a status-update if the message changed
                   if(result!=oldresult)
                   {
                                        oldresult=result;
                                        system("cls");
                                        cout<<result;
                   }            
        }      
        
    }
    
    
    
    //Check the life, returns a string with the action it did (or did not)
    string lifecheck()
    {
    
           mainwindow=FindWindow(NULL,"Path of Exile");
           
           if(mainwindow==0)
           {
                            //PoE not found - return
                            return "PoE ist not open!";
           }
           
           //Game is open, get life
           hopen=prozessauf();
           modulebase=GetModuleBase("Client.exe");
           currentlife=getlife(modulebase,hopen,0x6f6feC,0x000478,0x00004c,0x000588,0x00007c,0x0002c4); 
           
           //Life = 0 ? - User is not in a game
           if(currentlife==0)
           {
                             //User is not in a game, return
                             return "You are not in a game!";
           }
           
           //Life less than maxpossiblevalue ?
           if(currentlife<maxpossiblevalue)
           {
                             //Chicken activated, close game
                             TerminateProcess(hopen, 0); // Close window 
                             //The message won´t show up, because it will be overwritten by "PoE is not open" instantly, so we make a short sleep and change the output here
                             //The window gets closed before, so it is no problem to do that
                             system("cls");
                             cout<<"Chicken activated!! Your Energy Shield was "+convertInt(currentlife)+"!";
                             Sleep(5000);
                             return "Chicken activated!! Energy Shield was "+convertInt(currentlife)+"!";
           }
           
           //still here, so just return the current life as string
           return "Your current life is "+convertInt(currentlife)+"\n\nChicken will be activated at "+convertInt(maxpossiblevalue)+" Energy Shield!";   
    }
        
    
    
    //Get the current life
    int getlife(DWORD modulebase, HANDLE hopen, DWORD offset0, DWORD offset1,DWORD offset2, DWORD offset3, DWORD offset4,DWORD offset5)
    {
          DWORD life;
          life=modulebase+offset0;
          life=getadr(life,hopen);
          life=life+offset1;
          life=getadr(life,hopen);
          life=life+offset2;
          life=getadr(life,hopen);
          life=life+offset3;
          life=getadr(life,hopen);
          life=life+offset4;
          life=getadr(life,hopen);
          life=life+offset5;
          life=getadr(life,hopen);
          
          return life;
    }  
      
    //Open an process
       
    HANDLE prozessauf() 
    
    {
        HWND hwar3=::FindWindow(NULL,"Path of Exile");
        DWORD PID, TID;
        TID = ::GetWindowThreadProcessId (hwar3, &PID);
        HANDLE hopen=OpenProcess( PROCESS_ALL_ACCESS|PROCESS_TERMINATE |PROCESS_VM_READ|
                      PROCESS_VM_WRITE,FALSE,PID);
        return hopen;
    }
    
    //Get adress of Modulename
    DWORD GetModuleBase(LPSTR lpModuleName)
    {
        DWORD dwProcessId,TID;
        HWND hwar3=::FindWindow(NULL,"Path of Exile");
        TID = ::GetWindowThreadProcessId (hwar3, &dwProcessId);
         
       MODULEENTRY32 lpModuleEntry = {0};
       HANDLE hSnapShot = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, dwProcessId);
     
       if(!hSnapShot)
          return 0;
       lpModuleEntry.dwSize = sizeof(lpModuleEntry);
       BOOL bModule = Module32First( hSnapShot, &lpModuleEntry );
       while(bModule)
       {
          if(!strcmp( lpModuleEntry.szModule, lpModuleName ) )
          {
             CloseHandle(hSnapShot);
             return (DWORD)lpModuleEntry.modBaseAddr;
          }
          bModule = Module32Next( hSnapShot, &lpModuleEntry );
       }
       CloseHandle( hSnapShot );
       return 0;
    }
    
    
    //Get value behind an adress
    DWORD getadr(DWORD address, HANDLE hopen)
    {
        int value =0;
        ReadProcessMemory(hopen,(void*)address,&value,sizeof(value),0);
        return value;
    }    
    
    //Set value of an adress
    void setadr(DWORD address, int value, HANDLE hopen)
    {
        WriteProcessMemory(hopen, (LPVOID*)(DWORD) (address), &value, sizeof(value), NULL);
        return;
    }

  6. #6
    beefidus's Avatar Member
    Reputation
    1
    Join Date
    Oct 2012
    Posts
    17
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    is it possible to have the exe for ES too ? im a noob in compilation programming etc...

    tyvm

  7. #7
    AndyMan1987's Avatar Member
    Reputation
    1
    Join Date
    Mar 2013
    Posts
    14
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Es Chicken.rar

    Here, it's a .rar though.

  8. #8
    Dragonef22's Avatar Contributor
    Reputation
    178
    Join Date
    Jan 2011
    Posts
    252
    Thanks G/R
    0/3
    Trade Feedback
    4 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Updated for todays patch

  9. #9
    AndyMan1987's Avatar Member
    Reputation
    1
    Join Date
    Mar 2013
    Posts
    14
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here is updated Energy shield version

    Code:
    #include <Windows.h>
    #include <iostream>
    #include <tlhelp32.h>
    #include <string.h>
    #include <sstream>
    
    using namespace std;
    
    DWORD modulebase=0;
    HANDLE mainwindow=0;
    HANDLE hopen=0;
    
    int maxpossiblevalue=0;
    int currentlife=0;
    
    HANDLE prozessauf();
    DWORD GetModuleBase(LPSTR lpModuleName);
    DWORD getadr(DWORD address, HANDLE hopen);
    void setadr(DWORD address, int value, HANDLE hopen);
    int getlife(DWORD modulebase, HANDLE hopen, DWORD offset0, DWORD offset1,DWORD offset2, DWORD offset3, DWORD offset4,DWORD offset5);
    string lifecheck();
    
    
    //Converting the life integer I get from "getlife" to a string
    string convertInt(int number)
    {
       stringstream ss;
       ss << number;
       return ss.str();
    }
    
    
    //Mainmethod
    int main()
    
    {   
        system("title PoEChickenHack by Dragonef22 edited by Andy_man for ES V5.2 - 26.06.2013");
        system("color 1a");
       
        cout<<"Enter the maximum Energy shield your character can have before \nPoE will be closed!\n\n";
        cin>>maxpossiblevalue;      
    
        string oldresult="";
        string result="";
        
        //Looping
        while(true)
        {
                   Sleep(10);
                   result=lifecheck(); 
                   
                   //Do prevent console-spamming, we will only make a status-update if the message changed
                   if(result!=oldresult)
                   {
                                        oldresult=result;
                                        system("cls");
                                        cout<<result;
                   }            
        }      
        
    }
    
    
    
    //Check the life, returns a string with the action it did (or did not)
    string lifecheck()
    {
    
           mainwindow=FindWindow(NULL,"Path of Exile");
           
           if(mainwindow==0)
           {
                            //PoE not found - return
                            return "PoE ist not open!";
           }
           
           //Game is open, get life
           hopen=prozessauf();
           modulebase=GetModuleBase("Client.exe");
           currentlife=getlife(modulebase,hopen,0x6f701c,0x000478,0x00004c,0x000588,0x00007c,0x0002c4); 
           
           //Life = 0 ? - User is not in a game
           if(currentlife==0)
           {
                             //User is not in a game, return
                             return "You are not in a game!";
           }
           
           //Life less than maxpossiblevalue ?
           if(currentlife<maxpossiblevalue)
           {
                             //Chicken activated, close game
                             TerminateProcess(hopen, 0); // Close window 
                             //The message won´t show up, because it will be overwritten by "PoE is not open" instantly, so we make a short sleep and change the output here
                             //The window gets closed before, so it is no problem to do that
                             system("cls");
                             cout<<"Chicken activated!! Your Energy Shield was "+convertInt(currentlife)+"!";
                             Sleep(5000);
                             return "Chicken activated!! Energy Shield was "+convertInt(currentlife)+"!";
           }
           
           //still here, so just return the current life as string
           return "Your Energy Shield is "+convertInt(currentlife)+"\n\nChicken will be activated at "+convertInt(maxpossiblevalue)+" Energy Shield!";   
    }
        
    
    
    //Get the current life
    int getlife(DWORD modulebase, HANDLE hopen, DWORD offset0, DWORD offset1,DWORD offset2, DWORD offset3, DWORD offset4,DWORD offset5)
    {
          DWORD life;
          life=modulebase+offset0;
          life=getadr(life,hopen);
          life=life+offset1;
          life=getadr(life,hopen);
          life=life+offset2;
          life=getadr(life,hopen);
          life=life+offset3;
          life=getadr(life,hopen);
          life=life+offset4;
          life=getadr(life,hopen);
          life=life+offset5;
          life=getadr(life,hopen);
          
          return life;
    }  
      
    //Open an process
       
    HANDLE prozessauf() 
    
    {
        HWND hwar3=::FindWindow(NULL,"Path of Exile");
        DWORD PID, TID;
        TID = ::GetWindowThreadProcessId (hwar3, &PID);
        HANDLE hopen=OpenProcess( PROCESS_ALL_ACCESS|PROCESS_TERMINATE |PROCESS_VM_READ|
                      PROCESS_VM_WRITE,FALSE,PID);
        return hopen;
    }
    
    //Get adress of Modulename
    DWORD GetModuleBase(LPSTR lpModuleName)
    {
        DWORD dwProcessId,TID;
        HWND hwar3=::FindWindow(NULL,"Path of Exile");
        TID = ::GetWindowThreadProcessId (hwar3, &dwProcessId);
         
       MODULEENTRY32 lpModuleEntry = {0};
       HANDLE hSnapShot = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, dwProcessId);
     
       if(!hSnapShot)
          return 0;
       lpModuleEntry.dwSize = sizeof(lpModuleEntry);
       BOOL bModule = Module32First( hSnapShot, &lpModuleEntry );
       while(bModule)
       {
          if(!strcmp( lpModuleEntry.szModule, lpModuleName ) )
          {
             CloseHandle(hSnapShot);
             return (DWORD)lpModuleEntry.modBaseAddr;
          }
          bModule = Module32Next( hSnapShot, &lpModuleEntry );
       }
       CloseHandle( hSnapShot );
       return 0;
    }
    
    
    //Get value behind an adress
    DWORD getadr(DWORD address, HANDLE hopen)
    {
        int value =0;
        ReadProcessMemory(hopen,(void*)address,&value,sizeof(value),0);
        return value;
    }    
    
    //Set value of an adress
    void setadr(DWORD address, int value, HANDLE hopen)
    {
        WriteProcessMemory(hopen, (LPVOID*)(DWORD) (address), &value, sizeof(value), NULL);
        return;
    }
    Attached Files Attached Files

  10. #10
    enaryne's Avatar Private
    Reputation
    1
    Join Date
    Jul 2013
    Posts
    1
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    dont understand how it works its always writing tou are not in the game. win7 x64

  11. #11
    Dragonef22's Avatar Contributor
    Reputation
    178
    Join Date
    Jan 2011
    Posts
    252
    Thanks G/R
    0/3
    Trade Feedback
    4 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by enaryne View Post
    dont understand how it works its always writing tou are not in the game. win7 x64
    because its outdated and doenst work with the newest patch

  12. #12
    goranskoc's Avatar Member
    Reputation
    4
    Join Date
    Feb 2013
    Posts
    48
    Thanks G/R
    3/3
    Trade Feedback
    6 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Dragonef22 View Post
    because its outdated and doenst work with the newest patch
    Update please

  13. #13
    joneskull's Avatar Member
    Reputation
    1
    Join Date
    Jun 2007
    Posts
    25
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Does this work in the current version of Path of Exile?

  14. #14
    AndyMan1987's Avatar Member
    Reputation
    1
    Join Date
    Mar 2013
    Posts
    14
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Updated for patch 0.11.4b

    Health chicken
    Code:
    #include <Windows.h>
    #include <iostream>
    #include <tlhelp32.h>
    #include <string.h>
    #include <sstream>
    
    using namespace std;
    
    DWORD modulebase=0;
    HANDLE mainwindow=0;
    HANDLE hopen=0;
    
    int maxpossiblevalue=0;
    int currentlife=0;
    
    HANDLE prozessauf();
    DWORD GetModuleBase(LPSTR lpModuleName);
    DWORD getadr(DWORD address, HANDLE hopen);
    void setadr(DWORD address, int value, HANDLE hopen);
    int getlife(DWORD modulebase, HANDLE hopen, DWORD offset0, DWORD offset1,DWORD offset2, DWORD offset3, DWORD offset4,DWORD offset5);
    string lifecheck();
    
    
    //Converting the life integer I get from "getlife" to a string
    string convertInt(int number)
    {
       stringstream ss;
       ss << number;
       return ss.str();
    }
    
    
    //Mainmethod
    int main()
    
    {   
        system("title PoEChickenHack by Dragonef22 edited by Andy_man For Health");
        system("color 1a");
       
        cout<<"Enter the maximum Health your character can have before \nPoE will be closed!\n\n";
        cin>>maxpossiblevalue;      
    
        string oldresult="";
        string result="";
        
        //Looping
        while(true)
        {
                   Sleep(10);
                   result=lifecheck(); 
                   
                   //Do prevent console-spamming, we will only make a status-update if the message changed
                   if(result!=oldresult)
                   {
                                        oldresult=result;
                                        system("cls");
                                        cout<<result;
                   }            
        }      
        
    }
    
    
    
    //Check the life, returns a string with the action it did (or did not)
    string lifecheck()
    {
    
           mainwindow=FindWindow(NULL,"Path of Exile");
           
           if(mainwindow==0)
           {
                            //PoE not found - return
                            return "PoE ist not open!";
           }
           
           //Game is open, get life
           hopen=prozessauf();
           modulebase=GetModuleBase("Client.exe");
           currentlife=getlife(modulebase,hopen,0x00708b34,0x44,0x508,0x7c,0x00007c,0x0002d0); 
           
           //Life = 0 ? - User is not in a game
           if(currentlife==0)
           {
                             //User is not in a game, return
                             return "You are not in a game!";
           }
           
           //Life less than maxpossiblevalue ?
           if(currentlife<maxpossiblevalue)
           {
                             //Chicken activated, close game
                             TerminateProcess(hopen, 0); // Close window 
                             //The message won´t show up, because it will be overwritten by "PoE is not open" instantly, so we make a short sleep and change the output here
                             //The window gets closed before, so it is no problem to do that
                             system("cls");
                             cout<<"Chicken activated!! Your Health was "+convertInt(currentlife)+"!";
                             Sleep(5000);
                             return "Chicken activated!! Health was "+convertInt(currentlife)+"!";
           }
           
           //still here, so just return the current life as string
           return "Your Health is "+convertInt(currentlife)+"\n\nChicken will be activated at "+convertInt(maxpossiblevalue)+" HEalth!";   
    }
        
    
    
    //Get the current life
    int getlife(DWORD modulebase, HANDLE hopen, DWORD offset0, DWORD offset1,DWORD offset2, DWORD offset3, DWORD offset4,DWORD offset5)
    {
          DWORD life;
          life=modulebase+offset0;
          life=getadr(life,hopen);
          life=life+offset1;
          life=getadr(life,hopen);
          life=life+offset2;
          life=getadr(life,hopen);
          life=life+offset3;
          life=getadr(life,hopen);
          life=life+offset4;
          life=getadr(life,hopen);
          life=life+offset5;
          life=getadr(life,hopen);
          
          return life;
    }  
      
    //Open an process
       
    HANDLE prozessauf() 
    
    {
        HWND hwar3=::FindWindow(NULL,"Path of Exile");
        DWORD PID, TID;
        TID = ::GetWindowThreadProcessId (hwar3, &PID);
        HANDLE hopen=OpenProcess( PROCESS_ALL_ACCESS|PROCESS_TERMINATE |PROCESS_VM_READ|
                      PROCESS_VM_WRITE,FALSE,PID);
        return hopen;
    }
    
    //Get adress of Modulename
    DWORD GetModuleBase(LPSTR lpModuleName)
    {
        DWORD dwProcessId,TID;
        HWND hwar3=::FindWindow(NULL,"Path of Exile");
        TID = ::GetWindowThreadProcessId (hwar3, &dwProcessId);
         
       MODULEENTRY32 lpModuleEntry = {0};
       HANDLE hSnapShot = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, dwProcessId);
     
       if(!hSnapShot)
          return 0;
       lpModuleEntry.dwSize = sizeof(lpModuleEntry);
       BOOL bModule = Module32First( hSnapShot, &lpModuleEntry );
       while(bModule)
       {
          if(!strcmp( lpModuleEntry.szModule, lpModuleName ) )
          {
             CloseHandle(hSnapShot);
             return (DWORD)lpModuleEntry.modBaseAddr;
          }
          bModule = Module32Next( hSnapShot, &lpModuleEntry );
       }
       CloseHandle( hSnapShot );
       return 0;
    }
    
    
    //Get value behind an adress
    DWORD getadr(DWORD address, HANDLE hopen)
    {
        int value =0;
        ReadProcessMemory(hopen,(void*)address,&value,sizeof(value),0);
        return value;
    }    
    
    //Set value of an adress
    void setadr(DWORD address, int value, HANDLE hopen)
    {
        WriteProcessMemory(hopen, (LPVOID*)(DWORD) (address), &value, sizeof(value), NULL);
        return;
    }
    Energy shield chicken

    Code:
    #include <Windows.h>
    #include <iostream>
    #include <tlhelp32.h>
    #include <string.h>
    #include <sstream>
    
    using namespace std;
    
    DWORD modulebase=0;
    HANDLE mainwindow=0;
    HANDLE hopen=0;
    
    int maxpossiblevalue=0;
    int currentlife=0;
    
    HANDLE prozessauf();
    DWORD GetModuleBase(LPSTR lpModuleName);
    DWORD getadr(DWORD address, HANDLE hopen);
    void setadr(DWORD address, int value, HANDLE hopen);
    int getlife(DWORD modulebase, HANDLE hopen, DWORD offset0, DWORD offset1,DWORD offset2, DWORD offset3, DWORD offset4,DWORD offset5);
    string lifecheck();
    
    
    //Converting the life integer I get from "getlife" to a string
    string convertInt(int number)
    {
       stringstream ss;
       ss << number;
       return ss.str();
    }
    
    
    //Mainmethod
    int main()
    
    {   
        system("title PoEChickenHack by Dragonef22 edited by Andy_man for ES V5.2 - 26.06.2013");
        system("color 1a");
       
        cout<<"Enter the maximum Energy shield your character can have before \nPoE will be closed!\n\n";
        cin>>maxpossiblevalue;      
    
        string oldresult="";
        string result="";
        
        //Looping
        while(true)
        {
                   Sleep(10);
                   result=lifecheck(); 
                   
                   //Do prevent console-spamming, we will only make a status-update if the message changed
                   if(result!=oldresult)
                   {
                                        oldresult=result;
                                        system("cls");
                                        cout<<result;
                   }            
        }      
        
    }
    
    
    
    //Check the life, returns a string with the action it did (or did not)
    string lifecheck()
    {
    
           mainwindow=FindWindow(NULL,"Path of Exile");
           
           if(mainwindow==0)
           {
                            //PoE not found - return
                            return "PoE ist not open!";
           }
           
           //Game is open, get life
           hopen=prozessauf();
           modulebase=GetModuleBase("Client.exe");
           currentlife=getlife(modulebase,hopen,0x00708b34,0x4c,0x588,0x7c,0x00007c,0x000244); 
           
           //Life = 0 ? - User is not in a game
           if(currentlife==0)
           {
                             //User is not in a game, return
                             return "You are not in a game!";
           }
           
           //Life less than maxpossiblevalue ?
           if(currentlife<maxpossiblevalue)
           {
                             //Chicken activated, close game
                             TerminateProcess(hopen, 0); // Close window 
                             //The message won´t show up, because it will be overwritten by "PoE is not open" instantly, so we make a short sleep and change the output here
                             //The window gets closed before, so it is no problem to do that
                             system("cls");
                             cout<<"Chicken activated!! Your Energy Shield was "+convertInt(currentlife)+"!";
                             Sleep(5000);
                             return "Chicken activated!! Energy Shield was "+convertInt(currentlife)+"!";
           }
           
           //still here, so just return the current life as string
           return "Your Energy Shield is "+convertInt(currentlife)+"\n\nChicken will be activated at "+convertInt(maxpossiblevalue)+" Energy Shield!";   
    }
        
    
    
    //Get the current life
    int getlife(DWORD modulebase, HANDLE hopen, DWORD offset0, DWORD offset1,DWORD offset2, DWORD offset3, DWORD offset4,DWORD offset5)
    {
          DWORD life;
          life=modulebase+offset0;
          life=getadr(life,hopen);
          life=life+offset1;
          life=getadr(life,hopen);
          life=life+offset2;
          life=getadr(life,hopen);
          life=life+offset3;
          life=getadr(life,hopen);
          life=life+offset4;
          life=getadr(life,hopen);
          life=life+offset5;
          life=getadr(life,hopen);
          
          return life;
    }  
      
    //Open an process
       
    HANDLE prozessauf() 
    
    {
        HWND hwar3=::FindWindow(NULL,"Path of Exile");
        DWORD PID, TID;
        TID = ::GetWindowThreadProcessId (hwar3, &PID);
        HANDLE hopen=OpenProcess( PROCESS_ALL_ACCESS|PROCESS_TERMINATE |PROCESS_VM_READ|
                      PROCESS_VM_WRITE,FALSE,PID);
        return hopen;
    }
    
    //Get adress of Modulename
    DWORD GetModuleBase(LPSTR lpModuleName)
    {
        DWORD dwProcessId,TID;
        HWND hwar3=::FindWindow(NULL,"Path of Exile");
        TID = ::GetWindowThreadProcessId (hwar3, &dwProcessId);
         
       MODULEENTRY32 lpModuleEntry = {0};
       HANDLE hSnapShot = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, dwProcessId);
     
       if(!hSnapShot)
          return 0;
       lpModuleEntry.dwSize = sizeof(lpModuleEntry);
       BOOL bModule = Module32First( hSnapShot, &lpModuleEntry );
       while(bModule)
       {
          if(!strcmp( lpModuleEntry.szModule, lpModuleName ) )
          {
             CloseHandle(hSnapShot);
             return (DWORD)lpModuleEntry.modBaseAddr;
          }
          bModule = Module32Next( hSnapShot, &lpModuleEntry );
       }
       CloseHandle( hSnapShot );
       return 0;
    }
    
    
    //Get value behind an adress
    DWORD getadr(DWORD address, HANDLE hopen)
    {
        int value =0;
        ReadProcessMemory(hopen,(void*)address,&value,sizeof(value),0);
        return value;
    }    
    
    //Set value of an adress
    void setadr(DWORD address, int value, HANDLE hopen)
    {
        WriteProcessMemory(hopen, (LPVOID*)(DWORD) (address), &value, sizeof(value), NULL);
        return;
    }
    Energy Shield Chicken PoE.zip
    Health Chicken PoE.zip
    Last edited by AndyMan1987; 08-22-2013 at 05:17 AM.

  15. #15
    Beelzix's Avatar Member
    Reputation
    1
    Join Date
    Jun 2011
    Posts
    58
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    what does this chicken thing do?

Page 1 of 2 12 LastLast

Similar Threads

  1. [Linux] simple injection with LD_PRELOAD
    By Sednogmah in forum WoW Memory Editing
    Replies: 37
    Last Post: 04-24-2012, 07:07 PM
  2. [LF] Simple website with account creation vote panel and donator system
    By trujillo in forum WoW EMU Questions & Requests
    Replies: 1
    Last Post: 10-20-2009, 10:40 PM
  3. Coloa Fishbot - Simple fishbot with source
    By grosfilsdepute in forum World of Warcraft Bots and Programs
    Replies: 5
    Last Post: 10-20-2009, 08:48 AM
  4. Making a very simple program with Java.
    By Strichnine in forum Programming
    Replies: 1
    Last Post: 10-02-2009, 02:27 PM
  5. Very simple problem with Wamp - I cant get my server site up - please help
    By faxmunky in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 04-19-2008, 02:59 AM
All times are GMT -5. The time now is 12:07 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search