| View previous topic :: View next topic |
| Author |
Message |
samuri25404 Grandmaster Cheater
Reputation: 7
Joined: 04 May 2007 Posts: 955 Location: Why do you care?
|
Posted: Sun Jan 20, 2008 2:08 pm Post subject: [C#] process.exe+value |
|
|
I'm in the process of creating a trainer for a game (GTA - VC), and I'm writing a script for infinite health (AA--I have the parser and whatever, that's not what I need).
However, I found the pointer to the health address, and the base address is
How would I code that into my trainer? The "gta-vc.exe" mean the base address of the program, correct?
_________________
|
|
| Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Sun Jan 20, 2008 2:15 pm Post subject: |
|
|
| Yes, and to get the base entry (in native API) you would take a snapshot of the process (CreateToolhelp32Snapshot) and retrieve (Module32First, Module32Next) MODULEENTRY32.modBaseAddr
|
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Sun Jan 20, 2008 4:09 pm Post subject: |
|
|
You can get the module's base address of the main module by calling System.Diagnostics.Process.MainModule.BaseAddress;
To see all the modules you can do
foreach (System.Diagnostics.ProcessModule pm in Process.Modules)
MessageBox.Show(pm.ToString());
But gta-vc.exe+xxxx is actually BaseAddress+xxxx or EntryPoint+xxxx? base address, right?
|
|
| Back to top |
|
 |
samuri25404 Grandmaster Cheater
Reputation: 7
Joined: 04 May 2007 Posts: 955 Location: Why do you care?
|
Posted: Sun Jan 20, 2008 4:19 pm Post subject: |
|
|
Thank you both. Yes, Symbol, process+xxxx = EntryPoint + xxxx.
_________________
|
|
| Back to top |
|
 |
Flyte Peanuts!!!!
Reputation: 6
Joined: 19 Apr 2006 Posts: 1887 Location: Canada
|
Posted: Sun Jan 20, 2008 5:46 pm Post subject: |
|
|
| samuri25404 wrote: | | Create a Cheat Engine [C#.NET] |
It would be too slow. Like I said before, make the scanner in another language.
| samuri25404 wrote: | | Create a rootkit [C++ probably] |
C, if you need help, just PM me.
|
|
| Back to top |
|
 |
samuri25404 Grandmaster Cheater
Reputation: 7
Joined: 04 May 2007 Posts: 955 Location: Why do you care?
|
Posted: Sun Jan 20, 2008 6:40 pm Post subject: |
|
|
| Flyte wrote: | | samuri25404 wrote: | | Create a Cheat Engine [C#.NET] |
It would be too slow. Like I said before, make the scanner in another language. |
Well, just FYI, Symbol's written a really nice one (yes, him and I are working together on it). I looked at a "really old" version (according to him), and it didn't work too badly, he said he was going to PM me the newest one, and I'm gonna test it out.
[quote = "Flyte"] | samuri25404 wrote: | | Create a rootkit [C++ probably] |
C, if you need help, just PM me. [/quote]
Thanks!
I'm currently working on my trainer with the Keyboard hook (I have the Keyboard hook working, I'm just playing around with the actual trainer )
After this, I might make a DLL injector, but I'll probably go ahead and start on the rootkit.
_________________
Last edited by samuri25404 on Sun Jan 20, 2008 7:03 pm; edited 3 times in total |
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Sun Jan 20, 2008 6:56 pm Post subject: |
|
|
| The only problem is writing the addresses into the text file/adding to a list, it takes too much time... I'm scanning the whole memory reigon (lets say 0x00400000 to 0x0050000) and it returns all the bytes in less than a second, I can't think of a way to write them faster or adding them to the list faster...
|
|
| Back to top |
|
 |
samuri25404 Grandmaster Cheater
Reputation: 7
Joined: 04 May 2007 Posts: 955 Location: Why do you care?
|
Posted: Sun Jan 20, 2008 7:05 pm Post subject: |
|
|
If nothing else, we can be inefficient and do this:
| Code: |
//THIS IS PSEUDO-CODE
Scan
Increment a counter if the value matches
Do nothing else
Create an Array
Size = Counter
Scan
This time, store the values in the array
|
So yes, we scan twice, but if it returns all the values in less than a second, it probably won't make too much of a difference.
_________________
|
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Sun Jan 20, 2008 7:20 pm Post subject: |
|
|
I think storing the values in the array just takes so much time, because I add them to the list/file (now using only a file with the matched addresses) or its the fact its .NET
So it doesn't matters if you say "this one matchs, this one doesn't" I think adding to the list will take the same time, because comparing is like what, 10 bytes for my compares? (if ((exactscan && value == match) ^ (biggerthan && value >= match) ^ (smallerthan && value <= match) && etc...))
|
|
| Back to top |
|
 |
samuri25404 Grandmaster Cheater
Reputation: 7
Joined: 04 May 2007 Posts: 955 Location: Why do you care?
|
Posted: Sun Jan 20, 2008 8:05 pm Post subject: |
|
|
Nah, see, arrays are much faster than Lists for assigning.
MyArray[0] = i;
Where i is an int, and MyArray is an int[], one million times goes incredibly quickly (I don't remember the exact number, but I ran a test on it, you should search for it).
Why are they so much faster than lists in that aspects? Doing MyArray[0] = i; is just like doing myvar = i; Whereas with Lists, you have to allocate space every time you add something, then it has to go and let the List know that it has another variable, then it has to store it (this part doesn't take long, but you get the idea).
_________________
|
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Mon Jan 21, 2008 5:14 am Post subject: |
|
|
| I just created a whole new scan so I have to finish it first, but I'll try making another scan only with exact value, 1 byte and see if it works.
|
|
| Back to top |
|
 |
|