View previous topic :: View next topic |
Author |
Message |
DDS Expert Cheater
Reputation: 3
Joined: 10 Feb 2011 Posts: 112 Location: Bill's Planet
|
Posted: Sun Oct 09, 2011 3:22 pm Post subject: Module Addresses in [Visual Basic 2010] |
|
|
Hi all,
how can I enter Module Addresses in Visual Basic 2010 [for example: ClashOfHeroes.exe+0043EFB8 instead of 180EFB8]
I Know That I Have to + The Module base Address + 0043EFB8 In Order to get the Pointers Static Address
but Every Time I restart the Game The Static Address 180EFB8 Changes Locations
Another Example of What im Trying to do :
I Know this is the way is got to be Done.
Code: | Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim Address As Integer
ReadMemoryPointer("ClashOfHeroes", &H180EFB8, Address)
Address += &HC
ReadMemoryPointer("ClashOfHeroes", Address, Address)
Address += &H0
ReadMemoryPointer("ClashOfHeroes", Address, Address)
Address += &H74C
WriteMemoryPointer("ClashOfHeroes", Address, 99)
End Sub |
In Order for my Trainer to Write 99 Moves in the Game but When i Restart
the Game the Trainer Wont Work, and the Only Reason i Know why the Static Address or the Module base Address Changes Location is because
i Looked 4 all the Addresses all Over Again and they Where Diferent
And this is what im trying 2 do
Code: | Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim Address As Integer
ReadMemoryPointer("ClashOfHeroes", ClashOfHeroes.exe+0043EFB8 , Address)
Address += &HC
ReadMemoryPointer("ClashOfHeroes", Address, Address)
Address += &H0
ReadMemoryPointer("ClashOfHeroes", Address, Address)
Address += &H74C
WriteMemoryPointer("ClashOfHeroes", Address, 99)
End Sub |
Any Help Woul be Great
Thx in Advance
_________________
elDarkDragonSlayer |
|
Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Sun Oct 09, 2011 4:07 pm Post subject: |
|
|
Use GetModuleHandle to get the address of a loaded module
|
|
Back to top |
|
 |
Innovation Grandmaster Cheater
Reputation: 12
Joined: 14 Aug 2008 Posts: 617
|
Posted: Sun Oct 09, 2011 4:40 pm Post subject: |
|
|
Slugsnack wrote: | Use GetModuleHandle to get the address of a loaded module |
GetModuleHandle will only work if the module is loaded by the calling process. Since you're using the .NET framework, I'm assuming that this isn't going to be an injected DLL. You will need to transverse the module list.
|
|
Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Sun Oct 09, 2011 5:34 pm Post subject: |
|
|
Given this is in .NET, you can just do this without the need of API using the Process class:
http://msdn.microsoft.com/en-us/library/system.diagnostics.process.aspx
You can locate your process using:
Process.GetProcessesByName
Then with the returned Process object use Modules and loop them to see if the one you need resides in the collection.
_________________
- Retired. |
|
Back to top |
|
 |
DDS Expert Cheater
Reputation: 3
Joined: 10 Feb 2011 Posts: 112 Location: Bill's Planet
|
Posted: Sun Oct 09, 2011 7:23 pm Post subject: |
|
|
Can U Guys Give me some Code Examples 4 VB.NET
_________________
elDarkDragonSlayer |
|
Back to top |
|
 |
Unbr0ken Advanced Cheater
Reputation: 2
Joined: 10 Aug 2011 Posts: 67
|
Posted: Sun Oct 09, 2011 8:21 pm Post subject: |
|
|
DarKDragonSlayer wrote: | Can U Guys Give me some Code Examples 4 VB.NET |
C# example (Convert to VB.NET, is not so hard):
Code: | static void Main()
{
try
{
Console.Write("Write the name of process to read: ");
string pName = Console.ReadLine();
Console.Write(string.Format("The process \"{0}\" is {1}", pName, (System.Diagnostics.Process.GetProcessesByName(pName)[0].HasExited) ? "not running!." : string.Format("running! - PID: {0:d4}\nBase Address of Main Module: {1:X8}", System.Diagnostics.Process.GetProcessesByName(pName)[0].Id, System.Diagnostics.Process.GetProcessesByName(pName)[0].MainModule.BaseAddress.ToInt32())));
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
Console.ReadKey();
} |
...
|
|
Back to top |
|
 |
Pingo Grandmaster Cheater
Reputation: 8
Joined: 12 Jul 2007 Posts: 571
|
Posted: Mon Oct 10, 2011 4:40 am Post subject: |
|
|
Going by what Wiccaan said, id do something like this
Code: | Public Function RetBase(ByVal ProcName As String, ByVal ModuleName As String) As Integer
Dim P As Process() = Process.GetProcessesByName(ProcName)
If (P.Length <> 0) Then
Dim pMod As ProcessModuleCollection = P(0).Modules
For i As Integer = pMod.Count - 1 To 0 Step -1
If pMod.Item(i).FileName.EndsWith(ModuleName) Then
Return pMod.Item(i).BaseAddress.ToInt32
End If
Next i
End If
Return 0
End Function |
Your address would be
Code: | Dim Your_Addy As Integer = RetBase(ClashOfHeroes, ClashOfHeroes.exe) + &H43EFB8 |
It will also do any module in the collection.
Code: | Dim Module_Base As Integer = RetBase(ClashOfHeroes, Some_Module.dll) |
_________________
|
|
Back to top |
|
 |
|