• Amused
  • Angry
  • Annoyed
  • Awesome
  • Bemused
  • Cocky
  • Cool
  • Crazy
  • Crying
  • Down
  • Drunk
  • Embarrased
  • Enraged
  • Friendly
  • Geeky
  • Godly
  • Happy
  • Hateful
  • Hungry
  • Innocent
  • Meh
  • Piratey
  • Poorly
  • Sad
  • Secret
  • Shy
  • Sneaky
  • Tired
  • Wtf
  • At Work
  • CodenzHub
  • Coding
  • Deejaying
  • Donating
  • Drinking
  • Eating
  • Editing
  • Hacking
  • Hate Mailing
  • Jamin'
  • Lagging
  • Live Streaming
  • Lurking
  • No Status
  • Pawning
  • PC Gaming
  • PS Gaming
  • Raging
  • Reversing
  • Sleeping
  • Steam Gaming
  • Trolling
  • TwitchStreamer
  • Vodka!
  • Watching TV/Movie
  • Xbox Gaming
  • Youtuber
  • Zombies
  • Results 1 to 9 of 9
    1. #1
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      Khonnor's Avatar
      Join Date
      Mar 2014
      Posts
      30
      Thanks (-->)
      34
      Thanks (<--)
      20

      Question Basic Teleport hack issue?

      John Kittz
      Hi there, I've been trying to learn a bit of C++ as of late and came up with a basic teleport hack dll that I've been using for a couple of games.
      It seems to work for the most part except for example, when I press a hot key more than once, or just seemingly at random, my game will crash. Here's my source code.

      #include <Windows.h>
      DWORD XcoordOLD;
      DWORD YcoordOLD;
      DWORD ZcoordOLD;
      DWORD Base1 = (DWORD)GetModuleHandle(TEXT("GAME.EXE")) + 0x00CDC5AC;


      void Hack()
      {
      while (1)
      {
      if (GetAsyncKeyState(VK_END))
      {
      DWORD Address1 = *(DWORD*)(*(DWORD*)(*(DWORD*)(*(DWORD*)(*(DWORD*)(Base1)+0x1f4) + 0x6c) + 0x4) + 0x4) + 0xC8;
      DWORD *Value1 = (DWORD*)Address1;
      XcoordOLD = *Value1; //Stores X coordinate into Value1
      DWORD Address2 = *(DWORD*)(*(DWORD*)(*(DWORD*)(*(DWORD*)(*(DWORD*)(Base1)+0x1f4) + 0x6c) + 0x4) + 0x4) + 0xd0;
      DWORD *Value2 = (DWORD*)Address2;
      ZcoordOLD = *Value2; //Stores Z coordinate into Value2
      DWORD Address3 = *(DWORD*)(*(DWORD*)(*(DWORD*)(*(DWORD*)(*(DWORD*)(Base1)+0x1f4) + 0x6c) + 0x4) + 0x4) + 0xCC;
      DWORD *Value3 = (DWORD*)Address3;
      YcoordOLD = *Value3; //Stores Y Coordinate into Value3
      }

      if (GetAsyncKeyState(VK_DELETE))
      {
      DWORD Address1 = *(DWORD*)(*(DWORD*)(*(DWORD*)(*(DWORD*)(*(DWORD*)(Base1)+0x1f4) + 0x6c) + 0x4) + 0x4) + 0xC8;
      DWORD *Value1 = (DWORD*)Address1;
      *Value1 = XcoordOLD; //Re-writes players coordinate with the value of Value1
      DWORD Address2 = *(DWORD*)(*(DWORD*)(*(DWORD*)(*(DWORD*)(*(DWORD*)(Base1)+0x1f4) + 0x6c) + 0x4) + 0x4) + 0xd0;
      DWORD *Value2 = (DWORD*)Address2;
      *Value2 = ZcoordOLD; //Re-writes players coordinate with the value of Value2
      DWORD Address3 = *(DWORD*)(*(DWORD*)(*(DWORD*)(*(DWORD*)(*(DWORD*)(Base1)+0x1f4) + 0x6c) + 0x4) + 0x4) + 0xCC;
      DWORD *Value3 = (DWORD*)Address3;
      *Value3 = YcoordOLD; //Re-writes players coordinate with the value of Value3
      }

      }
      }
      BOOL APIENTRY DllMain(HINSTANCE hDll, DWORD callReason, LPVOID lpReserved) {
      if (callReason == DLL_PROCESS_ATTACH) {
      CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)&Hack, 0, 0, 0);
      MessageBox(NULL, "DLL injected! Please check the Readme.txt for instructions.", "Sucess!", MB_OK);//Post a message if we injected.

      }

      return 1;
      }

      Is it because I'm delaring the variables each time I press the hot key?
      Or is it something else.

      I know my methods are pretty redundant right now, but it actually took me a little while to figure out how to use pointers in my source code. So as always, any help as well as criticism is always appreciated.

    2. #2
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      Ayamin's Avatar
      Join Date
      Apr 2014
      Posts
      16
      Thanks (-->)
      1
      Thanks (<--)
      2
      Try declaring the variables globally. Also, what I like to do to prevent confusion is to write out every single multi-level pointer. (Didn't look through every single parenthesis in your code, but there might be a typo.)

      So, for example (for some game I was working on):


      DWORD base = (DWORD)0x00690320;
      DWORD ptr0 = *(DWORD*)(base); // value of the "base" address before offset applied
      DWORD ptr1 = (DWORD)(ptr0 + 0x464); // address after offset applied (address of HP)
      //etc...
      void changeHP() {
      *(DWORD*)ptr1 += 100;
      }



      Also, you have it so that it loops as fast as your computer can process. (Millions, billions times per second.)
      You're going to want to Sleep() for a few seconds after each iteration of the call.
      So, for example, going on with the previous example:


      void loop() {

      while (1) {
      changeHP();
      Sleep(200);
      }
      }


      Also, I sent you a PM; I can help you with C++ implementation if you can help me with assembly and reversing.
      Last edited by Ayamin; 04-27-2014 at 03:44 PM.

    3. Thanks Khonnor, arxlex thanked for this post
    4. #3
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      Khonnor's Avatar
      Join Date
      Mar 2014
      Posts
      30
      Thanks (-->)
      34
      Thanks (<--)
      20
      Thanks for the tips, I'll give them a try sometime.

    5. #4
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      Ayamin's Avatar
      Join Date
      Apr 2014
      Posts
      16
      Thanks (-->)
      1
      Thanks (<--)
      2
      Did you figure it out?

    6. #5
      Jr.Coder
      Learning to hack games!
       
      Steam Gaming
       
      crx123's Avatar
      Join Date
      Apr 2014
      Posts
      62
      Thanks (-->)
      0
      Thanks (<--)
      17
      Quote Originally Posted by Ayamin View Post
      Did you figure it out?
      I don't know how to do it in c++ but in CE's auto assembler i tried to get a multi pointer and i had to check if it's actually there, if i didn't i always crashed.
      I asked for some help ce forum, i can't remember it was atom0s or ++METHOS who gave me my code with "cmp ecx,00010000"
      it was something like this:
      poppy was just pop ecx with originalcode and returnhere


      As i said idk if you have to do it or how to do it in c++

      push ecx
      mov ecx,[esi+50]
      cmp ecx,00010000
      jbe poppy
      mov ecx,[ecx]
      cmp ecx,00010000
      jbe poppy
      mov ecx,[ecx+04]
      //ecx = address+50 +0 +04

    7. #6
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      Ayamin's Avatar
      Join Date
      Apr 2014
      Posts
      16
      Thanks (-->)
      1
      Thanks (<--)
      2
      Quote Originally Posted by crx123 View Post
      I don't know how to do it in c++ but in CE's auto assembler i tried to get a multi pointer and i had to check if it's actually there, if i didn't i always crashed.
      I asked for some help ce forum, i can't remember it was atom0s or ++METHOS who gave me my code with "cmp ecx,00010000"
      it was something like this:
      poppy was just pop ecx with originalcode and returnhere


      As i said idk if you have to do it or how to do it in c++

      push ecx
      mov ecx,[esi+50]
      cmp ecx,00010000
      jbe poppy
      mov ecx,[ecx]
      cmp ecx,00010000
      jbe poppy
      mov ecx,[ecx+04]
      //ecx = address+50 +0 +04
      I think OP knows what the offsets are so he doesn't need to check if the values he wants to modify are there

    8. #7
      Jr.Coder
      Learning to hack games!
       
      Steam Gaming
       
      crx123's Avatar
      Join Date
      Apr 2014
      Posts
      62
      Thanks (-->)
      0
      Thanks (<--)
      17
      Quote Originally Posted by Ayamin View Post
      I think OP knows what the offsets are so he doesn't need to check if the values he wants to modify are there
      Not the values or offsets, the pointers.
      If you play a game vs bots, there might be a pointer created somewhere to all the bots stats or w/e. (Like in Sauerbraten game, pointer is created near a player)
      But if you play in an empty map, that pointer wouldn't be created, so when you try to access 12345678+50 +0 +04 , there might be no +50 +0 or + 04 and maybe thats why you would crash.
      Just so you know i don't know what im talking about, it's just my guess. Because i had to do a check in that asm code above, or i would crash when changing a map or just by doing nothing after some time

    9. #8
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      Khonnor's Avatar
      Join Date
      Mar 2014
      Posts
      30
      Thanks (-->)
      34
      Thanks (<--)
      20
      Sorry for the lack of updates, I've been quite busy lately.
      I'll definitely test out these theories soon and let you guys now.

    10. #9
      Global Moderator
      give me my colorz back
      FeelsBadMan
       
      Coding
       
      till0sch's Avatar
      Join Date
      Oct 2012
      Location
      Germany.
      Posts
      1,168
      Thanks (-->)
      179
      Thanks (<--)
      340
      Cheats'n'Trainers
      You should consider opening a console and writing what you get for the pointers. If it crashes, see info and exception offset and you'll see where it crashed in your code... Such things often appear when reading from an address where is no memory...

    Similar Game Hacker Threads

    1. [Release] Teleport & Bhop Hack [Up to 5 Savepoints]
      By CreepSore in forum Assault Cube Hacks
      Replies: 1
      Last Post: 05-18-2016, 09:18 PM
    2. [Release] Jbr2096 Cube 2 Sauerbraten Teleport Hack Warning:NOT PERFECT :D
      By Jbr2096 in forum Other Game Hacks
      Replies: 0
      Last Post: 12-20-2015, 05:02 AM
    3. [Release] Jbr2096 Free Assault Cube Teleport hack
      By Jbr2096 in forum Assault Cube Hacks
      Replies: 4
      Last Post: 12-20-2015, 02:45 AM
    4. [Release] Teleport Hack
      By wtlyons in forum Assault Cube Hacks
      Replies: 2
      Last Post: 11-24-2015, 08:00 PM
    5. [Help] [Assault Cube][VB.net] Teleport Hack
      By RenamonTC in forum Visual Basic
      Replies: 1
      Last Post: 11-04-2015, 08:50 PM

    Tags for this Thread