Register for your free account! | Forgot your password?

You last visited: Today at 05:53

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Hooking with D

Discussion on Hooking with D within the CO2 Programming forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jan 2013
Posts: 40
Received Thanks: 29
Hooking with D

Comes with a homemade DLL injector although there's probably others that will do the job just as good.

If anyone's interested here's the tools I use
D compiler:
IDE:
Mono-D (D support for MonoDevelop):
Attached Files
File Type: rar CODLL.rar (872.9 KB, 56 views)
ShittyMod is offline  
Thanks
5 Users
Old 02/15/2013, 22:29   #2
 
Super Aids's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 946
Thanks, this looks interesting. Always been interested in learning D, although I've never really looked into, so whenever I do then I got this to look at, if hooking in D ever gets my interest.
Super Aids is offline  
Old 02/15/2013, 23:12   #3
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,378
This thread gave me the D

It gave me the D hard






















































and I liked it.
pro4never is offline  
Thanks
2 Users
Old 02/17/2013, 19:56   #4
 
elite*gold: 0
Join Date: Jan 2013
Posts: 40
Received Thanks: 29
Sorry, this was done in a hurry, I just noticed some minor things that should be changed.

client.d line 18 -> Change to IHook!((sendMsg_Hooked)) _sendMsgHook;
client.d line 19 -> Change to IHook!((receiveMsg_Hooked)) _receiveMsgHook;

hooking.d line 155 -> Remove the entire toString method since it was used for debugging purposes only
hooking.d line 136 -> Change the uninstall method to:
Code:
	void uninstall()
	{

		if(_installed)
		{

			// Make memory writable
			DWORD oldProtect;
			VirtualProtect(_address, 32, PAGE_EXECUTE_READWRITE, &oldProtect);

			foreach(int i; 0.._length)
			{
				(cast(ubyte*)_address)[i] = _originalBytes[i];
			}

			// Restore memory protection
			VirtualProtect(_address, 32, oldProtect, &oldProtect);

			_installed = false;

		}

	}
There's probably some other minor stuff, but everything works as intended. Sending/receveing packets is easy to do too, and making small bots with this base should be no problem at all.

It's a shame this community is so dead
ShittyMod is offline  
Thanks
1 User
Old 02/18/2013, 00:38   #5
 
ImmuneOne's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 754
Received Thanks: 544
Quote:
Originally Posted by ShittyMod View Post
Sorry, this was done in a hurry, I just noticed some minor things that should be changed.

client.d line 18 -> Change to IHook!((sendMsg_Hooked)) _sendMsgHook;
client.d line 19 -> Change to IHook!((receiveMsg_Hooked)) _receiveMsgHook;

hooking.d line 155 -> Remove the entire toString method since it was used for debugging purposes only
hooking.d line 136 -> Change the uninstall method to:
Code:
	void uninstall()
	{

		if(_installed)
		{

			// Make memory writable
			DWORD oldProtect;
			VirtualProtect(_address, 32, PAGE_EXECUTE_READWRITE, &oldProtect);

			foreach(int i; 0.._length)
			{
				(cast(ubyte*)_address)[i] = _originalBytes[i];
			}

			// Restore memory protection
			VirtualProtect(_address, 32, oldProtect, &oldProtect);

			_installed = false;

		}

	}
There's probably some other minor stuff, but everything works as intended. Sending/receveing packets is easy to do too, and making small bots with this base should be no problem at all.

It's a shame this community is so dead
You're going to have a harsh time if you're trying to introduce a new language to this forum.
ImmuneOne is offline  
Thanks
1 User
Old 02/18/2013, 15:48   #6
 
elite*gold: 0
Join Date: Jan 2013
Posts: 40
Received Thanks: 29
Quote:
Originally Posted by ImmuneOne View Post
You're going to have a harsh time if you're trying to introduce a new language to this forum.
The syntax is like 90% C# though, so most of the baddies on these forums should be able to learn it pretty easily
ShittyMod is offline  
Old 02/20/2013, 04:10   #7
 
Super Aids's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 946
Quote:
Originally Posted by ShittyMod View Post
The syntax is like 90% C# though, so most of the baddies on these forums should be able to learn it pretty easily
Indeed and it got some neat features.
Super Aids is offline  
Reply


Similar Threads Similar Threads
[C++]DirectDraw Hooking
04/16/2012 - C/C++ - 9 Replies
Hallo liebe Community, bin gerade dabei ein etwas älteres Spiel was DirectDraw (dx7) benutzt zu Hooken..Da ich mich mit DirectDraw nicht gut auskenne und nicht wie bei dx9 wüsste wie ich an eine EndScene käme versuche ich die Blt Funktion zu detouren und dort das BackSurface abzugreifen, welches schließlich auf das FrontSurface gezeichnet werden müsste.. (falls ich Unrecht habe bitte korrigieren) Um nun an die Blt Methode zu gelangen, besorg ich mir zunächst das DirectDraw7-Interface. ...
Account Hooking
03/30/2010 - AutoIt - 4 Replies
Hi, I would like to know how to hook an account with my bot, Example i play conquer online.I open my bot and it show my char name and i click hook,and then bot is connected to my account,how to hook the bot to the character, Thank you
C++ D3D Hooking
08/24/2009 - C/C++ - 12 Replies
Hallo zusammen, ich stehe gerade vor folgendem Problem: ich habe eine DLL und einen Loader gecoded, jedoch will ich anstelle des Loader einen Injecter haben, sprich: das spiel, in das injected werden soll, soll schon laufen. Natürlich hab ich das ganze schon probiert, jedoch werden die D3D-funktionen nicht wirklich gehookt, da die DLL auf ein Direct3DCreate9 wartet. Da diese Funktion aber wahrscheinlich direkt beim Starten des "Opfer-Spiels" ausgeführt wird, werden deswegen die anderen...



All times are GMT +1. The time now is 05:53.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.