| View previous topic :: View next topic |
| Author |
Message |
ETneedHelp How do I cheat?
Reputation: 0
Joined: 17 May 2012 Posts: 9
|
Posted: Thu May 17, 2012 5:28 pm Post subject: Search Value In And Get The Memory Addres :( |
|
|
Hello,
my english is bad - but:
i make program in vb.net
the main subject is:
Search Value In Another Process And Get The Memory Addres of the value
the problem:
i look for this thing in all the internet,
and i have no Solution
so, some one can give me example of code that Get The Memory Addres of the value
search value like CE >> return Memory Addres
I prefer that the example to be in VB.NET
if it c# or c or c++ it fine
but i need Explanation where to put my
"value to search for in the process"
and where to put my:
"process name"
If anyone here can do that,
I would be more grateful
Very important project
|
|
| Back to top |
|
 |
vnlagrla Cheater
Reputation: 0
Joined: 10 Apr 2011 Posts: 33
|
Posted: Thu May 17, 2012 9:54 pm Post subject: |
|
|
Can you read memory? if so set up a loop and search the range you want to scan for the value like this. This is not vb it's c# if you know what your doing it should be easily convertable, might be slow though never really tried it. also if you can make lists in vb you might want to add the returned adress to a list in case there are many adresses that might get returned.
| Code: |
public int search(int baseadress, int length, int val)
{
// baseadress = adress to start search
// length = length to search
// val = value your searching for
for (int i = 0; i < length; i++)
{
if ((ReadInt(baseadress + (i)) == val)
{
return baseadress+i;
}
}
} |
sorry but idk how to get process and handle in vb. Maybe wiccaan can help?
|
|
| Back to top |
|
 |
NotReallySureWhatGoesHere Expert Cheater
Reputation: -1
Joined: 20 Feb 2012 Posts: 110
|
Posted: Thu May 17, 2012 10:24 pm Post subject: |
|
|
| vnlagrla wrote: | Can you read memory? if so set up a loop and search the range you want to scan for the value like this. This is not vb it's c# if you know what your doing it should be easily convertable, might be slow though never really tried it. also if you can make lists in vb you might want to add the returned adress to a list in case there are many adresses that might get returned.
| Code: |
public int search(int baseadress, int length, int val)
{
// baseadress = adress to start search
// length = length to search
// val = value your searching for
for (int i = 0; i < length; i++)
{
if ((ReadInt(baseadress + (i)) == val)
{
return baseadress+i;
}
}
} |
sorry but idk how to get process and handle in vb. Maybe wiccaan can help? |
I believe it's Process.Handle or Process.MainWindowHandle - not 100% sure though.
I don't program in C# (I like Java) so sorry if that's incorrect.
|
|
| Back to top |
|
 |
ETneedHelp How do I cheat?
Reputation: 0
Joined: 17 May 2012 Posts: 9
|
Posted: Fri May 18, 2012 4:50 am Post subject: |
|
|
| vnlagrla wrote: | Can you read memory? if so set up a loop and search the range you want to scan for the value like this. This is not vb it's c# if you know what your doing it should be easily convertable, might be slow though never really tried it. also if you can make lists in vb you might want to add the returned adress to a list in case there are many adresses that might get returned.
| Code: |
public int search(int baseadress, int length, int val)
{
// baseadress = adress to start search
// length = length to search
// val = value your searching for
for (int i = 0; i < length; i++)
{
if ((ReadInt(baseadress + (i)) == val)
{
return baseadress+i;
}
}
} |
sorry but idk how to get process and handle in vb. Maybe wiccaan can help? |
First of all thanks everyone
The second thing that can help me very much(the code)
ReadInt is like readprocessmemory?
One last thing:
i need library for it?
lenght - what i need to put there?
If you have a full code that works I'll be glad if you post it
EDIT:
Error 1 The name 'ReadInt' does not exist in the current context
[/b]
Last edited by ETneedHelp on Fri May 18, 2012 5:26 am; edited 1 time in total |
|
| Back to top |
|
 |
Pingo Grandmaster Cheater
Reputation: 8
Joined: 12 Jul 2007 Posts: 571
|
Posted: Fri May 18, 2012 5:05 am Post subject: |
|
|
No ReadInt is just a function he created to read 4 bytes, he probably just overlooked that when posting the code.
You'l need to create one, very simple to do.
Also if you know the address ends in 0,4,8,C you could change this line
| Code: | | for (int i = 0; i < length; i++) |
to
| Code: | | for (int i = 0; i < length; i += 4) |
That will increase the scan speed x4
Lots of examples on how to read memory on this forum. Just search for it.
_________________
|
|
| Back to top |
|
 |
ETneedHelp How do I cheat?
Reputation: 0
Joined: 17 May 2012 Posts: 9
|
Posted: Fri May 18, 2012 5:36 am Post subject: |
|
|
| Pingo wrote: | No ReadInt is just a function he created to read 4 bytes, he probably just overlooked that when posting the code.
You'l need to create one, very simple to do.
Also if you know the address ends in 0,4,8,C you could change this line
| Code: | | for (int i = 0; i < length; i++) |
to
| Code: | | for (int i = 0; i < length; i += 4) |
That will increase the scan speed x4
Lots of examples on how to read memory on this forum. Just search for it. |
bro
I tried everything and still did not work for me
you can make my code better?
| Code: |
public int search(int baseadress, int length, int val)
{
// baseadress = adress to start search
// length = length to search
// val = value your searching for
for (int i = 0; i < length; i++)
{
if ((ReadInt(baseadress + (i)) == val))
{
return baseadress+i;
}
}
}
private void button1_Click(object sender, EventArgs e)
{
System.Diagnostics.Process[] processes = System.Diagnostics.Process.GetProcessesByName("plugin-container");
int baseaddr = processes[0].MainModule.BaseAddress.ToInt32();
int res = search(baseaddr, 100, 15035990);
listBox1.Items.Add(res);
}
|
First time that I tired from searching
Error 1 The name 'ReadInt' does not exist in the current context
|
|
| Back to top |
|
 |
Pingo Grandmaster Cheater
Reputation: 8
Joined: 12 Jul 2007 Posts: 571
|
Posted: Fri May 18, 2012 6:50 am Post subject: |
|
|
I told you you need to create a ReadInt function. Heres a simple example having everything in one go with a ReadInt built into it.
| Code: | public List<int> Search(string ProcessName, int _Length, int Value)
{
Process[] P = Process.GetProcessesByName(ProcessName);
List<int> tmp = new List<int>();
if (P.Length < 0) return tmp;
byte[] buff = new byte[4];
int Address = P[0].MainModule.BaseAddress.ToInt32();
for (int i = 0; i < _Length; i++)
{
ReadProcessMemory(P[0].Handle, Address + i, buff, 4, 0);
if (BitConverter.ToInt32(buff, 0) == Value)
{
tmp.Add(Address + i);
}
}
return tmp;
} |
I never tested the code for errors but here is two ways to use it with your listbox.
List the addresses in decimel format
| Code: | | listBox1.DataSource = Search("plugin-container", 0x100, 15035990); |
or in hex format
| Code: | foreach (int i in Search("plugin-container", 0x100, 15035990))
{
listBox1.Items.Add(i.ToString("X"));
} |
_________________
|
|
| Back to top |
|
 |
ETneedHelp How do I cheat?
Reputation: 0
Joined: 17 May 2012 Posts: 9
|
Posted: Fri May 18, 2012 6:55 am Post subject: |
|
|
| Pingo wrote: | I told you you need to create a ReadInt function. Heres a simple example having everything in one go with a ReadInt built into it.
| Code: | public List<int> Search(string ProcessName, int _Length, int Value)
{
Process[] P = Process.GetProcessesByName(ProcessName);
List<int> tmp = new List<int>();
if (P.Length < 0) return tmp;
byte[] buff = new byte[4];
int Address = P[0].MainModule.BaseAddress.ToInt32();
for (int i = 0; i < _Length; i++)
{
ReadProcessMemory(P[0].Handle, Address + i, buff, 4, 0);
if (BitConverter.ToInt32(buff, 0) == Value)
{
tmp.Add(Address + i);
}
}
return tmp;
} |
I never tested the code for errors but here is two ways to use it with your listbox.
List the addresses in decimel format
| Code: | | listBox1.DataSource = Search("plugin-container", 0x100, 15035990); |
or in hex format
| Code: | foreach (int i in Search("plugin-container", 0x100, 15035990))
{
listBox1.Items.Add(i.ToString("X"));
} |
|
Thank you!
Process[] P = Process.GetProcessesByName(ProcessName);
He did not recognize me that line
What libary to import?
edit:
i import the lib
and he not recornize:
| Code: |
ReadProcessMemory(P[0].Handle, Address + i, buff, 4, 0); |
|
|
| Back to top |
|
 |
Pingo Grandmaster Cheater
Reputation: 8
Joined: 12 Jul 2007 Posts: 571
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Tue May 22, 2012 5:20 am Post subject: |
|
|
Spamming ReadProcessMemory is extremely inefficient. You should be reading blocks of memory at a time and then scanning what you've read after. You'll have a lot better performance doing it that way.
_________________
- Retired. |
|
| Back to top |
|
 |
Pingo Grandmaster Cheater
Reputation: 8
Joined: 12 Jul 2007 Posts: 571
|
Posted: Wed May 23, 2012 12:16 pm Post subject: |
|
|
| Wiccaan wrote: | | Spamming ReadProcessMemory is extremely inefficient. You should be reading blocks of memory at a time and then scanning what you've read after. You'll have a lot better performance doing it that way. |
Thats how i do it, reading blocks. His original code scanned by byte so i just went with it.
_________________
|
|
| Back to top |
|
 |
NotReallySureWhatGoesHere Expert Cheater
Reputation: -1
Joined: 20 Feb 2012 Posts: 110
|
Posted: Wed May 23, 2012 11:08 pm Post subject: |
|
|
| Wiccaan wrote: | | Spamming ReadProcessMemory is extremely inefficient. You should be reading blocks of memory at a time and then scanning what you've read after. You'll have a lot better performance doing it that way. |
Can you please give a simple sample of this. I'd like to learn the C# language more, but mainly I'd like to get in to this gaming stuff. Sorry for it though, so thank you.
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Mon May 28, 2012 7:52 am Post subject: |
|
|
| It's Just Josh wrote: | | Wiccaan wrote: | | Spamming ReadProcessMemory is extremely inefficient. You should be reading blocks of memory at a time and then scanning what you've read after. You'll have a lot better performance doing it that way. |
Can you please give a simple sample of this. I'd like to learn the C# language more, but mainly I'd like to get in to this gaming stuff. Sorry for it though, so thank you. |
Use VirtualQueryEx to read the memory information and loop through the pages to know their start address and size, as well as protection(s). Then use ReadProcessMemory to read each page. (Check the return of RPM to see if it the read was too big and adjust as needed, etc.)
_________________
- Retired. |
|
| Back to top |
|
 |
NotReallySureWhatGoesHere Expert Cheater
Reputation: -1
Joined: 20 Feb 2012 Posts: 110
|
Posted: Mon May 28, 2012 9:03 am Post subject: |
|
|
| Wiccaan wrote: | | It's Just Josh wrote: | | Wiccaan wrote: | | Spamming ReadProcessMemory is extremely inefficient. You should be reading blocks of memory at a time and then scanning what you've read after. You'll have a lot better performance doing it that way. |
Can you please give a simple sample of this. I'd like to learn the C# language more, but mainly I'd like to get in to this gaming stuff. Sorry for it though, so thank you. |
Use VirtualQueryEx to read the memory information and loop through the pages to know their start address and size, as well as protection(s). Then use ReadProcessMemory to read each page. (Check the return of RPM to see if it the read was too big and adjust as needed, etc.) |
Lol guess I need to do some Google'ing :p Thanks for the tips!
|
|
| Back to top |
|
 |
|