Go Back   UnKnoWnCheaTs - Multiplayer Game Hacks and Cheats > Anti-Cheat Software & Programming > .NET

- Sponsored Advertisement -
http://www.myfpscheats.com/

Welcome to the UnKnoWnCheaTs - Multiplayer Game Hacks and Cheats.
You have to register before you can post and see and access any of the advanced forum features, please click the register link to proceed to the registration form. To start viewing threads or posts, select a forum that you want to visit from the selection below.
.NET
hacking programming reversing
You are Unregistered, please register to gain Full access.    
Reply
 
Thread Tools

Find a module base with C#
Old 08-24-2010, 10:20 PM   #1
Level 3

T0mz0r's Avatar

Join Date: Sep 2006
Posts: 15
Reputation: -128
Rep Power: 0
T0mz0r is an outcastT0mz0r is an outcast
Find a module base with C#

Hello,

I'm trying to make a trainer in C# to learn the language, but I have a problem.
I need to find the base address of a module (RendDX9) in another process. I've searched google but found nothing that could help. Hopefully there is someone here who can help.

Thanks a lot!
T0mz0r is offline

Reply With Quote


Old 08-24-2010, 10:46 PM   #2
SEGnosis
Guest

Posts: n/a
GetModuleHandle(null) equivalent in C#

/thread

Reply With Quote

Old 08-26-2010, 08:03 AM   #3
Broken Moderator

kolbybrooks's Avatar

Join Date: Aug 2006
Location: United States
Posts: 760
Reputation: 33567
Rep Power: 418
kolbybrooks has a huge epeen!kolbybrooks has a huge epeen!kolbybrooks has a huge epeen!kolbybrooks has a huge epeen!kolbybrooks has a huge epeen!kolbybrooks has a huge epeen!kolbybrooks has a huge epeen!kolbybrooks has a huge epeen!kolbybrooks has a huge epeen!kolbybrooks has a huge epeen!kolbybrooks has a huge epeen!
Points: 23,105, Level: 21
Points: 23,105, Level: 21 Points: 23,105, Level: 21 Points: 23,105, Level: 21
Activity: 20.0%
Activity: 20.0% Activity: 20.0% Activity: 20.0%
Last Achievements
System.Diagnostics.Process.Modules (?)..

PSEUDO CODE!
Code:
Process[] ProcessList = System.Diagnostics.Process.GetProcessByName("bfh");
IntPtr 

if (ProcessList.Length > 0
{
	Process MYPROCESS = ProcessList[0];
	IntPtr BaseAddress = IntPtr.Zero;

	foreach (System.Diagnostics.ProcessModule Module in MYPROCESS.Modules)
	{
		if (Module.ModuleName.Contains("RendDX9"))
			BaseAddress = Module.BaseAddress;
	}

	if (BaseAddress != IntPtr.Zero)
	{
		// Win?
	}
}
--

Quote:
Originally Posted by SEGnosis View Post
Not /thread, because that doesn't get him the Base Address of a module in another process; But because of my post we can possibly /thread (?)
kolbybrooks is online now

Reply With Quote

Old 08-26-2010, 06:47 PM   #4
Level 3

T0mz0r's Avatar

Threadstarter
Join Date: Sep 2006
Posts: 15
Reputation: -128
Rep Power: 0
T0mz0r is an outcastT0mz0r is an outcast
Hello.

I had it working with System.Diagnostics (basicly the same way as your code kolbybrooks. still thanks for the good help), but I have a new problem. It says the only modules are:

BF2.exe
ntdll.dll
wow64.dll
wow64win.dll
wow64cpu.dll

I have tried spawning in game first to make sure RendDX9 would have been loaded. This one beats me.

Any help apreciated!
T0mz0r is offline

Reply With Quote

Old 08-26-2010, 07:02 PM   #5
Retired Admin

learn_more's Avatar

Join Date: Sep 2006
Posts: 5,249
Reputation: 93628
Rep Power: 1106
learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!
Recognitions:
Members who have contributed financial support towards UnKnoWnCheaTs. Donation (2)
sieg heil Nazi
Points: 70,490, Level: 39
Points: 70,490, Level: 39 Points: 70,490, Level: 39 Points: 70,490, Level: 39
Activity: 24.7%
Activity: 24.7% Activity: 24.7% Activity: 24.7%
Last Achievements
Award-Showcase
Quote:
Originally Posted by T0mz0r View Post
Hello.

I had it working with System.Diagnostics (basicly the same way as your code kolbybrooks. still thanks for the good help), but I have a new problem. It says the only modules are:

BF2.exe
ntdll.dll
wow64.dll
wow64win.dll
wow64cpu.dll

I have tried spawning in game first to make sure RendDX9 would have been loaded. This one beats me.

Any help apreciated!
looks like an x64 problem, try running your app as x86
__________________
learn_more is offline

Reply With Quote

Old 08-26-2010, 07:37 PM   #6
Level 3

T0mz0r's Avatar

Threadstarter
Join Date: Sep 2006
Posts: 15
Reputation: -128
Rep Power: 0
T0mz0r is an outcastT0mz0r is an outcast
Quote:
Originally Posted by learn_more View Post
looks like an x64 problem, try running your app as x86
What is the best way to do this? Is it code related or just run in something like compatible mode?

Thanks
T0mz0r is offline

Reply With Quote
Reply  

  • Submit Thread to Digg
  • Submit Thread to del.icio.us
  • Submit Thread to StumbleUpon
  • Submit Thread to Google
  • Submit Thread to Facebook
  • Submit Thread to My Yahoo!
  • Submit Thread to MySpace
  • Submit Thread to Twitter
  • Submit Thread to Reddit



Tags
base, module
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT +1. The time now is 03:20 PM.