CS GO hack help

Posts 17 of 7 · Page 1 of 1
CS GO hack help
Im pretty good with C# but never did any c++. This code calls the Kernel32.dll to read memory from CS:GO. My question is, how would I identify if my crosshair is on a enemy or not?
Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Diagnostics;
using System.Runtime.InteropServices;

namespace test
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        const int PROCESS_WM_READ = 0x0010;

        [DllImport("kernel32.dll")]
        public static extern IntPtr OpenProcess(int dwDesiredAccess, bool bInheritHandle, int dwProcessId);

        [DllImport("kernel32.dll")]
        public static extern bool ReadProcessMemory(int hProcess,
          int lpBaseAddress, byte[] lpBuffer, int dwSize, ref int lpNumberOfBytesRead);

        private void Form1_Load(object sender, EventArgs e)
        {
            Process process = Process.GetProcessesByName("csgo")[0];
            IntPtr processHandle = OpenProcess(PROCESS_WM_READ, false, process.Id); 
           
        }
    }
}
Well man I wold help you but I don't know where to start here...
I know this is c++ but since you were really good in c# I guess you can translate it.
C++ really is the language for writing to memory, I just hate you can't make any nice forms with it. Anyways you would have to import the players' base address and see who is a teammate and whos an enemy.
Quote Originally Posted by Jim Morrison View Post
C++ really is the language for writing to memory, I just hate you can't make any nice forms with it. Anyways you would have to import the players' base address and see who is a teammate and whos an enemy.
You can make nice forms with C++. Even without making in decompilable.

If you are using Visual Studio, you can use MFC Application. Even though it is ALOT harder you can still make it.
A lil training will probably do the job.
Quote Originally Posted by ERGaergaergaergaergearg View Post
You can make nice forms with C++. Even without making in decompilable.

If you are using Visual Studio, you can use MFC Application. Even though it is ALOT harder you can still make it.
A lil training will probably do the job.
^This
I started learning them and they're very nice, just doing everything is different and takes a bit more.
it's possible with C#, but using Pinvoke is very unpleasant and C# is way slower language than C++. Also with game hacking you have to use WinAPI instead of .net libraries so just go for C++. Way faster, cannot be decompiled EASILY back to source, easier since you have to work with winAPI.
Posts 17 of 7 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?