taultunleashed logoReading from the memory : Developer's Corner - Page 2
newtopic  postreply
 [ 20 posts ]  Previous  1, 2
blue large dot

Reading from the memory : Developer's Corner - Page 2

Posted: May 21st, 2004, 9:07 pm
 
Admin
Admin's Reps:
User avatar
If you are wanting to intercept keyboard or mouse commands, I have an interface that does that.

(If you are making a plugin, wont work with scripts yet)


Reply with quote
Posted: May 22nd, 2004, 1:50 am
 
draeman
draeman's Reps:
User avatar
I want to intercept internal game function calls and rip the information straight out of the game rather than rely on capturing screen information. My game of choice uses some blending techniques (or so I've read) so that changes in lighting and background actually affect things like the health bars making screen reading very unreliable. However, the game uses the UT engine of which there's a lot of information on internal game structure out in the open, which I thought would make adding hooks a reasonable thing to attempt.

I've seen a few links on thecodeproject web site with tutorials on hooking in c#.net (yes this would definitely have to be a plugin) and there's obviously the msdn to have a flick through. I think I'm right in saying this is only local hooking (since I know the programs/dlls to hook into), but I'm not sure if I'm going to need any more information other than object/class and function call name - I guess this is the bit I have to learn! :P

Thanks for the advice above, I'll probably be begging for more though in the near future. :-)


Reply with quote
Posted: May 22nd, 2004, 4:48 am
 
cadesign
cadesign's Reps:
User avatar
OKay let's try to help you a little more.

You want to hook your client by using SetWindowsHookEx function.

Assuming that your are going to hook client's process you need to crate a dll taht will be content your hook function declare as an export.

Assuming that your dll is called Hook.Dll.

You need to define in this dll an exported function for example a MouseProc function.

In your process, the first thing you need is to get client to hook main thread id (i do this with toolhelp32.dll).
Secondary you need to import Hook.Dll in your process space and retrieve the module handle (GetModuleHandle)
Tertiary Get your MouseProc Addr using GetProcAddress (HMod, lpzFunctionNAme)
Finally you need to call SetWindowsHookEx with all this parameters you retrieve.
At this point you have injected in your client processes your dll Hook.Dll and you intercepting all mouse messages.

More interesting in your dll you can wrote a function for her entry point.

Entry point is a function called with one parameters by the kernel when a process or a thread load or unload (attach or unattach) a dll.

In this entry point you can do a lot of things like :
Creating a shared space between your process and the hooked process (CreateFileMapping).
Create a new thread with messaging queue to manage incoming command from your process to dll in target process.
And finaly memory patching target process exe code.

If you need help on this topic i will answer you but i'am mainly programming in delphi since many years so C++ is difficult for me :(


Reply with quote
Posted: May 22nd, 2004, 11:02 am
 
Admin
Admin's Reps:
User avatar
What is the game?

Do you have the address of the function you want to hook?

If it will help, I can add a function to the IXUWindow to allow you to hook very easily a function and call your function when it gets called if that would help?


Reply with quote
Posted: May 23rd, 2004, 12:10 am
 
draeman
draeman's Reps:
User avatar
It's Lineage2. It's built on the UT2003 engine and there are 'depackers' around that read the engine files and tell you all of the objects/classes and functions that are in the main dll's. I can find out the offset of the functions within the dll's, but then I would still need to find out where the dll is loaded into the game memory space. I'm not sure if you're able to do that easily, but I'm going to continue reading up and experimenting with C# in any case.


Reply with quote
Want Advertisements After The Last Post Removed? Create A Free Account!

blue large dot Who is online
Users browsing this forum: No registered users and 7 guests

cron
Popular Sections
SWTOR Cheats
Guild Wars 2 Cheats
Guild Wars 2 Hacks
Guild Wars 2 Bots
Diablo 3 Cheats
Guild Wars 2 Mods

Popular Sections
WoW Cataclysm Cheats & Exploits
WoW Cataclysm Hacks & Bots
Star Wars The Old Republic Cheats
SWTOR Mods
Torchlight 2 Cheats
SWTOR Space Mission Bots
Site Nav and RSS
RSS Feed of Developer's Corner RSS Feed 

SitemapIndex SitemapIndex
RSS Feed RSS Feed
Channel list Channel list
left bottom corner Site and Contents Copyright 2001-2012 All Rights Reserved TaultUnleashed.com bottom corner
top left
top right
createaccount
Username:   Password:   Remember Me?