View previous topic :: View next topic |
Author |
Message |
InuyashaITB Newbie cheater
Reputation: 0
Joined: 06 Sep 2009 Posts: 21 Location: california
|
Posted: Tue Sep 22, 2009 11:28 pm Post subject: How do i make a Hex Address Editor of my own? |
|
|
Ok, the subject does get the gist of what i want to do down.
Say i already have an address that i want to edit. All i want to know is how to change a hex address using VB.NET or C.
Here is a better example:
I have an address: 006912BE
Its value is: 1000
description: health
That is all the stuff that i would Already have on hand, FROM THERE, how do i use VB.NET to change the value of 006912BE to say 9999? (and may be freeze it?) |
|
Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Tue Sep 22, 2009 11:39 pm Post subject: |
|
|
WriteProcessMemory |
|
Back to top |
|
 |
InuyashaITB Newbie cheater
Reputation: 0
Joined: 06 Sep 2009 Posts: 21 Location: california
|
Posted: Tue Sep 22, 2009 11:49 pm Post subject: |
|
|
Hmm, do you have a little more specific of an example? like also how to open a currently running processes to write to? |
|
Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Tue Sep 22, 2009 11:51 pm Post subject: |
|
|
OpenProcess |
|
Back to top |
|
 |
igoticecream Grandmaster Cheater Supreme
Reputation: 0
Joined: 23 Apr 2006 Posts: 1807 Location: 0x00400000
|
Posted: Tue Sep 22, 2009 11:57 pm Post subject: |
|
|
in other words, slovach is trying to say OpenProcess return the handle of target process needed for WriteProcessMemory |
|
Back to top |
|
 |
InuyashaITB Newbie cheater
Reputation: 0
Joined: 06 Sep 2009 Posts: 21 Location: california
|
Posted: Wed Sep 23, 2009 12:08 am Post subject: |
|
|
I still dont quite get it, can you give specific example of code? |
|
Back to top |
|
 |
Stylo Grandmaster Cheater Supreme
Reputation: 3
Joined: 16 May 2007 Posts: 1073 Location: Israel
|
Posted: Wed Sep 23, 2009 4:07 am Post subject: |
|
|
what can't u understand?!
did u even read about writeprocessmemory?!
it's write the specific bytes you want to a specific address |
|
Back to top |
|
 |
InuyashaITB Newbie cheater
Reputation: 0
Joined: 06 Sep 2009 Posts: 21 Location: california
|
Posted: Wed Sep 23, 2009 9:26 am Post subject: |
|
|
lol...
this is what i have so far:
Code: |
Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal blnheritHandle As Boolean, ByVal dwAppProcessId As IntPtr) As IntPtr
Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As IntPtr, ByRef lpdwProcessId As IntPtr) As IntPtr
Private Const PROCESS_VM_READ = (&H10)
Public Sub TestOpenProcess(ByVal hwnd As IntPtr)
Dim lRet As IntPtr
Dim pid As IntPtr
Dim hProcess as IntPtr
' Assign a value to pid - this part works fine
lRet = GetWindowThreadProcessId(hwnd, pid)
' Try to open the process for reading
hProcess = OpenProcess(PROCESS_VM_READ, False, pid)
' At this point:
' hProcess = 0
' Err.LastDllError = 87 (Parameter incorrect or something like that)
Debug.Writeline("Error: " & Err.LastDllError)
End Sub
|
But where do i go from there... |
|
Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
|
Back to top |
|
 |
InuyashaITB Newbie cheater
Reputation: 0
Joined: 06 Sep 2009 Posts: 21 Location: california
|
Posted: Thu Sep 24, 2009 5:11 pm Post subject: |
|
|
Ok, here is my ... plan i geuss you can say:
I want to make a trainer of my own for the game Counter-Strike: Source. Its process name is HL2.EXE i want to be able to freeze and address using my own coding, but i do not know how to open the process for editing, how to inject my own data into the addresses that i want, nor do i know how to keep an address from changing values (freezing it).
Could someone give me a specific code example for VB 2008 that could do this? |
|
Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
|
Back to top |
|
 |
InuyashaITB Newbie cheater
Reputation: 0
Joined: 06 Sep 2009 Posts: 21 Location: california
|
Posted: Thu Sep 24, 2009 10:07 pm Post subject: |
|
|
Ok i have been working on this and this is what i have:
Code: |
Public Class Form1
Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Integer, ByRef lpBaseAddress As Object, _
ByRef lpBuffer As Object, ByVal nSize As Integer, ByRef _
lpNumberOfBytesWritten As Integer) As Integer
Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, _
ByVal blnheritHandle As Boolean, _
ByVal dwAppProcessId As IntPtr) As IntPtr
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Integer
Private Declare Function GetWindowThreadProcessId Lib "user32" Alias "GetWindowThreadProcessId" (ByVal hwnd As Integer, ByRef lpdwProcessId As Integer) As Integer
Private Declare Function CloseHandle Lib "kernel32" Alias "CloseHandle" (ByVal hObject As Integer) As Integer
Private Declare Function TerminateProcess Lib "kernel32" Alias "TerminateProcess" (ByVal hProcess As Integer, ByVal uExitCode As Integer) As Integer
Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Integer
Private Const SYNCHRONIZE As Integer = &H100000
Private Const PROCESS_TERMINATE As Integer = &H1
Private Const WM_CLOSE As Integer = &H10
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ProcessList As System.Diagnostics.Process()
Dim target_hwnd, target_process_id, target_process_handle As Integer
ProcessList = System.Diagnostics.Process.GetProcesses()
target_hwnd = FindWindow(vbNullString, "Counter-Strike Source")
If (target_hwnd = 0) Then
MsgBox("Error finding Target Window Handle")
Me.Close()
End If
target_process_id = 0
GetWindowThreadProcessId(target_hwnd, target_process_id)
If (target_process_id = 0) Then
MsgBox("Error finding Target Process ID")
Me.Close()
End If
target_process_handle = OpenProcess(SYNCHRONIZE, 1, target_process_id)
If (target_process_handle = 0) Then
MessageBox.Show("Error finding target process handle")
Me.Close()
End If
End Sub
End Class
|
It gets to the Target_Process_handle and it can't find the process handle, but it seems to find everything else just fine. |
|
Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Thu Sep 24, 2009 10:38 pm Post subject: |
|
|
Just do this instead of FindWindow() etc
Code: | Process[] proc = Process.GetProcessesByName("notepad");
int butt = proc[0].Id; |
|
|
Back to top |
|
 |
InuyashaITB Newbie cheater
Reputation: 0
Joined: 06 Sep 2009 Posts: 21 Location: california
|
Posted: Fri Sep 25, 2009 1:08 am Post subject: |
|
|
that came up with a huge list of errors. |
|
Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Fri Sep 25, 2009 1:45 am Post subject: |
|
|
Probably because it's C# because I somehow forgot we were discussing VB.NET code and this is what I meant to write
Code: | Dim proc As Process() = Process.GetProcessesByName("notepad")
Dim butt As Integer = proc(0).Id |
problem solved |
|
Back to top |
|
 |
|