Jump to content

Basics of a C++ Cheat


Clickforlife

10 posts in this topic

Recommended Posts

                                                                                                                                                     MADE BY A GOOD FRIEND OF MINE GOOD STUFF HERE

 

Basics of a C++ Cheat
Note: Sorry if I have some mistakes, also you should read everything so you'll be able to fix stuff in case of errors.
 

 

[code]

#include <iostream>
#include <windows.h>

 [/code]

This is pretty much all we're going to need for a simple console program, even if you want to add some other stuff, it's probably already in one of these two. Also, you will need to also include "stdafx.h" if you're using visual studio.
 

[code]

int main(){

 [/code]

We're using this because we will eventually have to return some integer values too, else we would just use void main.
 

[code]

SetConsoleTitle(L"Whatever_You_Like");

 [/code]

This is used to set the title of our console program (that means the name you see at the top) to something else. The L before the string is there for compatibility reasons and as long as you don't use any numbers, everything should go well.
 

[code]

HWND Window = FindWindow(NULL, L"Game");

[/code]

With this code, we are getting the handle of a specific window, which is "Game" (you can of course change it with whatever your game's window name is) and remember, it's not case-sensitive (If your window says "Battlefield" you can use "battlefield" too).
 

[code]

    if (!Window){
        return 0;
    }

[/code]

If the window (the one used above) has not been found (that's why the '!' is there), it closes the console (return 0);
 

[code]

else{
DWORD Pid;
        GetWindowThreadProcessId(Window, &Pid);
        HANDLE ProcessHandle= OpenProcess(PROCESS_ALL_ACCESS, FALSE, Pid);

[/code]

Pretty understandable from the code itself, we are getting a handle on the process itself to be able to edit its memory, of course.
 

[code]

        if(!ProcessHandle){
            return 0;
        }

[/code]

Again, if the program can't attach to it or maybe the process is stopping this from happening it will close your program.
 

[code]

else{

[/code]

This is where the actual hack begins, if all goes well.
 

[code]

for(; ;){

[/code]

This is a not-so-very popular way to create a loop, while(0){ can be used too. A loop basically means it will keep running trough the code and see if anything change or actually change something. Basically think it as freezing an address in cheat engine (though that's not the only thing we'll use it for.
 

[code]

if(GetAsyncKeyState(VK_F2)){

[/code]

This check if a key has been pressed, in this example we're using the F2 key. The added & 0x8000 you probably have seen before refers to the key being held, as far as I know, but it's really just useless in this example, you just want it to be pressed.
 

[code]

UINT_PTR FByteAddress= 0x01182A74;
float FloatAddress = 0x011A5B90;
int ValueForReading = NULL;
double DoubleAddress = 0x00FDB0F0;

[/code]

It's not very common that I see people use UINT_PTR, but it's basically a replacement for stuff including DWORD and is made especially for the 64 bit addressing and also able to hold more information. We also declared the integer 'ValueForReading' to hold the value for ReadProcessMemory (what's below)
 

[code]

ReadProcessMemory(ProcessHandle, reinterpret_cast<void*>(FByteAddress), &ValueForReading, sizeof(ValueForReading ), nullptr)

[/code]

We are basically reading 4ByteAddress' or 0x01182A74's value and storing it in the ValueForReading integer. You may also be un-familiar with nullptr which can also be overloaded, which you can use NULL (which is an integer with the value 0), but sadly if you use an old compiler, you may actually need to use NULL.
 

[code]

std::cout << "Value of 4Byte: " << ValueForReading << ".\n";

[/code]

Here we actually print ValueForReading's value just to check. Also, the "\n" is an alternative to std::endl or endl.
 

[code]

UINT_PTR Offsets[] = {0x4c, 0x3b};

[/code]

Here we're defining the offsets of our address (let's pretend we have offsets) and remember to write them in reverse of how they are in cheat engine (bottom to top).
 

[code]

WriteProcessMemory(ProcessHandle, reinterpret_cast<void*>(FByteAddress), &Offsets, 2, nullptr);

[/code]

Here we wrote the value '2' to that address basically, but let's move onto something like writing bytes.
 

[code]

WriteProcessMemory(ProcessHandle, reinterpret_cast<void*>(FByteAddress), "/0x90/, 1, nullptr);

[/code]

Here we wrote a nop which translates into 90 bytes (This shows into the Memory Viewer in Cheat Engine).



That is where you will get your bytes from. I won't go too much into detail on Assembly as it's not what I wanted to focus on. A full code can be found down below.
 

[code]

#include <iostream>
#include <windows.h>

int main(){
    SetConsoleTitle(L"djihjninjinjmu");
    HWND Window = FindWindow(NULL, L"csgo");
    if (!Window){
        return 0;
    }
    else{
        DWORD pID;
        GetWindowThreadProcessId(Window, &pID);
        HANDLE Hproc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pID);
        if(!Hproc){
            return 0;
        }
        else{
            std::cout << "Press F3 to activate.\n";
            for(; ;){
                if(GetAsyncKeyState(VK_F3)){
                    float Crosshair;
                    UINT_PTR CrosshairAddress = 0x44ABC04;
                    UINT_PTR Shoot = 0x5C4BB;
                    ReadProcessMemory(Hproc, reinterpret_cast<void*>(CrosshairAddress), &Crosshair, sizeof(Crosshair), nullptr);
                    if(Crosshair == 0){
                        WriteProcessMemory(Hproc, reinterpret_cast<void*>(Shoot), "0x32/0x8B/0x90/0x20/0x01/", 5, nullptr);
                        //This writes a special asm code that makes it shoot (it's just like changing its value from 0 to 1 but I preffer using this)
                    }
                    else if(Crosshair == 1){
                        WriteProcessMemory(Hproc, reinterpret_cast<void*>(Shoot), "0x32/0x8B/0x90/

[/code]

Link to comment
https://iosgods.com/topic/42199-basics-of-a-c-cheat/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Our picks

    • Solo Leveling:Arise Cheats v1.1.96 +2
      Modded/Hacked App: Solo Leveling:Arise By Netmarble Corporation
      Bundle ID: com.netmarble.sololv
      iTunes Store Link: https://apps.apple.com/th/app/solo-leveling-arise/id1662742277?uo=4


      Hack Features:
      - Semi God Mode (Immune to Physical Damage)
      - Multiply Attack / One Hit Kill

       

      This cheat has been tested with iPhone X 16.7.5 palera1n rootless, no jailbreak bypass required. Download the deb, open with iGameGod and use install & inject with iGameGod option. Done

      Dopamine 1.0 and 2.0 might work as well, no guarantee. If you have issue try using Shadow Bypass JB, if not work then this cheat is not for you


      iOS Hack Download Link: https://iosgods.com/topic/181160-solo-levelingarise-cheats-v1024-2/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 528 replies
    • Demon Squad: Idle RPG Cheats v1.61 +2
      Modded/Hacked App: Demon Squad: Idle RPG By SuperPlanet corp.
      Bundle ID: com.superplanet.demonsquad
      iTunes Store Link: https://apps.apple.com/us/app/demon-squad-idle-rpg/id6504470907?uo=4


      Hack Features:
      - Multiply Attack
      - Multiply Defense


      iOS Hack Download Link: https://iosgods.com/topic/185576-demon-squad-idle-rpg-cheats-v139-2/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 67 replies
    • Delusion: Tactical Idle RPG Cheats v2.1.0 +3
      Modded/Hacked App: Delusion: Tactical Idle RPG By SuperPlanet corp.
      Bundle ID: com.superplanet.delusion
      iTunes Store Link: https://apps.apple.com/us/app/delusion-tactical-idle-rpg/id6496342351?uo=4


      Hack Features:
      - Multiply Attack
      - God Mode
      - Freeze Currencies

      NOTE: Do not abuse or buy ViP just for this cheats


      iOS Hack Download Link: https://iosgods.com/topic/183614-delusion-tactical-idle-rpg-cheats-v1027-3/
        • Thanks
        • Winner
        • Like
      • 54 replies
    • BitLife - Life Simulator Cheats v3.16.3 +2
      Modded/Hacked App: BitLife - Life Simulator by Candywriter, LLC
      Bundle ID: com.wtfapps.apollo16
      iTunes Store Link: https://apps.apple.com/us/app/bitlife-life-simulator/id1374403536?uo=4&at=1010lce4


      Hack Features:
      - Infinite Cash
      - Free Bitizen Purchase (Press Cancle) - Work for All Versions


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/84167-arm64-bitlife-life-simulator-v1412-jailed-cheats-2/


      Hack Download Link: https://iosgods.com/topic/84223-arm64-bitlife-life-simulator-cheats-all-versions-2/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 3,284 replies
    • Smurfs' Village Cheats v2.70.2 +1
      Modded/Hacked App: Smurfs' Village By Flashman Studios LLC
      Bundle ID: com.capcommobile.smurfs
      iTunes Store Link: https://itunes.apple.com/us/app/smurfs-village/id399648212?mt=8&uo=4&at=1010lce4



      Hack Features:
      - Infinite Gold (Spend some)
      - Infinite SmurfBerries (Spend some)


      Hack Download Link: https://iosgods.com/topic/75948-arm64-smurfs-village-cheats-v1680-2/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 425 replies
    • Arcana Tactics v4.9.0 Jailed Cheats +3
      Modded/Hacked App: Arcana Tactics By Com2uS Holdings Corporation
      Bundle ID: com.gamevil.arcanatactics.ios.apple.global.normal
      iTunes Store Link: https://apps.apple.com/us/app/arcana-tactics/id1521412306?uo=4

      Hack Features:
      - Multiply Attack
      - Multiply Defense
      - Auto Win


      iOS Hack Download IPA Link: https://iosgods.com/topic/185737-arcana-tactics-v480-jailed-cheats-3/
        • Agree
        • Thanks
        • Like
      • 24 replies
    • Idle Theme Park - Tycoon Game Cheats v6.1.3 +1
      Modded/Hacked App: Idle Theme Park - Tycoon Game by Digital Things Sociedad Limitada
      Bundle ID: com.codigames.idle.theme.park.tycoon
      iTunes Store Link: https://apps.apple.com/us/app/idle-theme-park-tycoon-game/id1460772578?uo=4&at=1010lce4


      Hack Features:
      - Infinite Cash


      iOS Hack Download Link: https://iosgods.com/topic/116320-arm64-idle-theme-park-tycoon-game-cheats-v210-1/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 531 replies
    • Archero Cheats v6.7.1 +5 [ God Mode & More ]
      Modded/Hacked App: Archero by HABBY PTE. LTD.
      Bundle ID: com.habby.archero
      iTunes Store Link: https://apps.apple.com/us/app/archero/id1453651052?uo=4&at=1010lce4



      Hack Features:
      - Multiply Defense to
      - Multiply Damage to
      - God Mode
      - OHK (Must use with God Mode)
      - Freeze Enemies

      NOTE: If you want to use god mode and ohk turn off multiply damage and defense first. I added multiply damage and defense there to avoid ban


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/100710-archero-v210-enemies-dont-attack-x30-attack/


      Hack Download Link: https://iosgods.com/topic/96783-arm64-archero-cheats-v220-5/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 15,707 replies
    • RPG AVABEL ONLINE Cheats v11.10.0 - [ God Mode & More ]
      Modded/Hacked App: RPG AVABEL ONLINE By ASOBIMO,Inc.
      Bundle ID: com.asobimo.AvabelOnline
      iTunes Store Link: https://itunes.apple.com/us/app/rpg-avabel-online/id606800657
       

      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iFile / Filza / iFunBox / iTools or any other file managers for iOS.
      - Cydia Substrate (from Cydia).
      - PreferenceLoader (from Cydia).


      Hack Features:
      - God Mode 
      - Cast Speed Multiplier
      - Charge Speed Multiplier
      - Approach Speed Multiplier
      - No Roll CoolDown
      - No Skills CoolDown

      This hack is an In-Game Mod Menu (iGMM). In order to activate the Mod Menu, tap on the iOSGods button found inside the app. This hack works on the latest x64 or ARM64 iDevices: iPhone 5s, 6, 6 Plus, 6s, 6s Plus, 7, 7 Plus, 8, 8 Plus, X, Xr, Xs, Xs Max, SE, iPod Touch 6G, iPad Air, Air 2, Pro & iPad Mini 2, 3, 4 and later.
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 2,125 replies
    • Warhammer 40,000: Tacticus v1.23.57 +4 Cheats
      Modded/Hacked App: Warhammer 40,000: Tacticus By Snowprint Studios AB
      Bundle ID: com.snowprintstudios.tacticus
      iTunes Store Link: https://apps.apple.com/us/app/warhammer-40-000-tacticus/id1599937506?uo=4

      Hack Features:
      - Always Win [ even if all your characters die, you win ]
      - Custom Ability Stats
      - Ability Always Available
      - Game Speed Multiplier

      Note: Use characters that do ability attack to multiple enemies like Varro Tigurius & Bellator


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/163492-warhammer-40000-tacticus-v1133-3-cheats-for-jailed-idevices/


      iOS Hack Download Link: https://iosgods.com/topic/163377-warhammer-40000-tacticus-v1133-4-cheats/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 262 replies
    • Fortress Saga: AFK RPG Cheats v1.7.08 +5
      Modded/Hacked App: Fortress Saga: AFK RPG By cookapps
      Bundle ID: com.cookapps.bm.fortresssaga
      iTunes Store Link: https://apps.apple.com/us/app/fortress-saga-afk-rpg/id6446308106?uo=4


      Hack Features:
      - Damage Multiplier
      - Defense Multiplier
      - Free Store (not Free iAP)


      iOS Hack Download Link: https://iosgods.com/topic/178933-fortress-saga-afk-rpg-cheats-v1405-3/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 302 replies
    • Soul Strike Cheats v1.7.1 +7
      Modded/Hacked App: Soul Strike X Max-Level Newbie By Com2uS Holdings Corporation
      Bundle ID: com.com2usholdings.soulstrike.ios.apple.global.normal
      iTunes Store Link: https://apps.apple.com/us/app/soul-strike-x-max-level-newbie/id6458981827?uo=4


      Hack Features:
      - Multiply Attack
      - Multiply Defense
      - God Mode

      DO NOT BUY VIP FOR JUST THIS CHEAT. REMOVE ANY JB BYPASS FOR THE GAME

      THIS CHEAT HAS BEEN TESTED ON IPX 16.7.5 PALERA1N ROOTLESS, IPAD PRO M2 16.0 DOPAMINE


      iOS Hack Download Link: https://iosgods.com/topic/186316-exclusive-soul-strike-cheats-v158-3/
        • Informative
        • Agree
        • Thanks
        • Winner
        • Like
      • 131 replies
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines