Solved autoit memory value

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

vertex1996

Newbie
Full Member
May 23, 2014
18
144
0
Hi guys, im new and i need to know 1 thing maybe one can help me


for example i have the pointer adress

0123456 with the value 1
now i want to change the value to 2
i cant find any tutorial about this i need only to know how i can change this on AutoIt

thanks in advance
 

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,151
78,998
2,395
C#:
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;

namespace RakeCSharp
{
    internal class RakeCSMem
    {
        [DllImport("kernel32.dll")]
        private static extern IntPtr OpenProcess(uint processAccess, bool bInheritHandle, int processId);

        [DllImport("kernel32.dll", SetLastError = true)]
        private static extern bool ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, [Out] byte[] lpBuffer, int dwSize, out IntPtr lpNumberOfBytesRead);

        public static IntPtr FindDMAAddy(IntPtr hProc, IntPtr ptr, int[] offsets)
        {
            var buffer = new byte[IntPtr.Size];
            foreach (int i in offsets)
            {
                ReadProcessMemory(hProc, ptr, buffer, buffer.Length, out var read);

                ptr = (IntPtr.Size == 4)
                ? IntPtr.Add(new IntPtr(BitConverter.ToInt32(buffer, 0)), i)
                : ptr = IntPtr.Add(new IntPtr(BitConverter.ToInt64(buffer, 0)), i);
            }
            return ptr;
        }

        public static IntPtr GetModuleBaseAddress(Process proc, string modName)
        {
            IntPtr addr = IntPtr.Zero;

            foreach (ProcessModule m in proc.Modules)
            {
                if (m.ModuleName == modName)
                {
                        addr = m.BaseAddress;
                        break;
                }
            }
                return addr;
        }

        private static void Main(string[] args)
        {
            Process process;

            process = Process.GetProcessesByName("ac_client")[0];

            var hProc = OpenProcess(0x001F0FFF, false, process.Id);

            var modBase = GetModuleBaseAddress(process, "ac_client.exe");

            var addr = FindDMAAddy(hProc, (IntPtr)0x50f4f4, new int[] { 0x374, 0x14, 0 });

            Console.WriteLine("0x" + addr.ToString("X"));
        }
    }
}
 
Last edited:

gmastergreatee

Jr.Coder
Full Member
Nobleman
Aug 5, 2014
55
588
3
I assume that AutoIt is a game.

I use C# in visual studio. Go to C# section and download any memory class(You may also download the template I created in C# tutorial section and then use the Memory class that I updated later).
Use the PointerWrite function like this ::-

C#:
Process[] GameProcess = Process.GetProcessesByName("Name of game executable without extension");// The name must be in double-quotes.
             byte[] bytesToWrite = { 0x02 }; //This will be the hex value that you want to write at the pointer.
             int[] Offset = { 0x23, 0x23, 0x12 }; //Write the offsets here.
             int MemoryAddress = 0x123123 ; //Write the address in hex(put 0x at start)
             Memory.ReadProcess = GameProcess[0];
             Memory.Open();
             PointerWrite((IntPtr)MemoryAddress, int[] Offset, byte[] bytesToWrite);
             Memory.CloseHandle();
Hope I solved your problem.
 
Last edited:

vertex1996

Newbie
Full Member
May 23, 2014
18
144
0
thank you , but i have need it in autoit but , c# is maybe bether to hack games , but i cant find in the code , how i can change the value of the memory adress

for example we take the adress 1234

then it looks like this i think :


C++:
   Process[] GameProcess = Process.GetProcessesByName("hl2");// The name must be in double-quotes.
             byte[] bytesToWrite = { 0x1234 }; //This will be the hex value that you want to write at the pointer.
             int[] Offset = { 0x2c, 0x2c, 0x2c }; //Write the offsets here.
             int MemoryAddress = 0x1234 ; //Write the address in hex(put 0x at start)
             Memory.ReadProcess = GameProcess[0];
            [COLOR="#FF0000"]where i can find now the thing to change the memory value to 2 ?[/COLOR]
             Memory.Open();
             PointerWrite((IntPtr)MemoryAddress, int[] Offset, byte[] bytesToWrite);
             Memory.CloseHandle();
 

gmastergreatee

Jr.Coder
Full Member
Nobleman
Aug 5, 2014
55
588
3
So I think that you want to cheat in Counter Strike(as hl2.exe is the executable for that). Now, if you want to cheat the ammo count or money or the health, all these addresses reside in server.dll file, which is a sub-module of the game. I don't know AutoIt, so can only tell you the theory and basics that are similar in all language memory classes.

Please elaborate your problem, I can't get it well.

I think you are saying that you have an address, say 112233, and the value stored at that address is 1. Now you want to change its value. If it's the case then you need to consider the type of value
The type of value maybe byte, 2 bytes, 4 bytes, 8 bytes, float, double, etc etc.

For C#, use ::-
Write((IntPtr)MemoryAddress, byte[] bytesToWrite) -- This is the function that changes the value of an address
PointerWrite((IntPtr)MemoryAddress, int[] Offsets, byte[] bytesToWrite) -- This function changes the value of the address pointed by the pointer.

I can't tell C# is better to hack games or not, but I can definitely tell you that C# is extremely easy to learn and use. I don't use C++ either. People say that the best language for such stuff is C++.

If you want to learn C# to hack games, then please watch the tutorials by Fleep(C# related) first. And be more attentive to what he explains. All the basics are well explained there.

:)
 
Last edited:

vertex1996

Newbie
Full Member
May 23, 2014
18
144
0
i dont can see there where i change the value :D

For C#, use ::-
Write((IntPtr)MemoryAddress, byte[] bytesToWrite) -- This is the function that changes the value of an address
PointerWrite((IntPtr)MemoryAddress, int[] Offsets, byte[] bytesToWrite) -- This function changes the value of the address pointed by the pointer.
where i need to write the value??

sorry dude im german and i cant really understand the videos from fleeps my english skills not good at voice english i can read it this ok
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods