Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > C/C++
You last visited: Today at 18:55

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

Advertisement



how to inject code before AC loads

Discussion on how to inject code before AC loads within the C/C++ forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jun 2010
Posts: 15
Received Thanks: 0
how to inject code before AC loads

Hi guys,i´m having trouble with Xcrap..
What can i do to make my code work before xcrap loads and detects the modification?
VirtualProtections seems not working,even with correct syntax..
Code:
void WriteDWORD(DWORD *adr, int value)
{
	DWORD OldProtection;
	VirtualProtect((LPVOID)adr,0x01,PAGE_READWRITE,&OldProtection);//VirtualProtect((LPVOID)0x004C374F,1,PAGE_READWRITE,&OldProtection); 
	*(DWORD*)(adr) = value;//*(DWORD*)(0x004C374F) = 0x01; 
	VirtualProtect((LPVOID)adr,0x01,OldProtection,&OldProtection);//VirtualProtect((LPVOID)0x004C374F,1,OldProtection,&OldProtection); 
}
Code:
while(1)
	{
		HWND hWnd = FindWindow(0, "Priston Tale"); 

		if(hWnd)
		{
			GetWindowThreadProcessId(hWnd, &proc_id); 
			HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, proc_id); 

			if(hProcess)
			{
				WriteDWORD((PDWORD)0x004C374F,0x01);
				WriteDWORD((PDWORD)0x004C37A7,0x01);
				WriteDWORD((PDWORD)0x004C37EC,0x01);
Code works a bit of SECONDS of time and xcrap closes game
Thank you.
Cr4ck3r385 is offline  
Old 08/24/2013, 06:36   #2



 
+Yazzn's Avatar
 
elite*gold: 420
Join Date: Jan 2012
Posts: 1,082
Received Thanks: 1,000
To inject a DLL before Anti-Cheat loads you could try to create an injector which creates the games process with CREATE_SUSPENDED flag, injects your DLL to it (to get process handle check out PROCESS_INFORMATION.hProcess) and then resume the process.

P.S.: To write data to memory in a different process you have to use WriteProcessMemory.
+Yazzn is offline  
Reply


Similar Threads Similar Threads
Failed to inject error code 8
06/28/2013 - WarRock - 7 Replies
Failed to inject error code 8........please help me!
[C#]Pointer Wert lesen, schreiben und Code Inject
02/23/2012 - .NET Languages - 0 Replies
Kann mir jemand an einem Beispiel Code zeigen wie man Pointer Werte auslesen kann oder auch schreiben. Und Wie man Code Injecten kann^^.
Python Functions von Mt2 per C++ Code Inject ausführen?
12/02/2011 - C/C++ - 5 Replies
Hallo, wollte fragen, ob mir eventuell jemand beantworten kann, wie man Python Functions nützt, welche in den Metin2 - pack Files gespeichert sind. Und ob das überhaupt so wie ich mir das vorstelle möglich ist.
[WR-Frage] Failed to Inject / [PROMO CODE]<für Zombie Mode!
10/16/2010 - WarRock - 10 Replies
Hey ePvPer's ;) Ich weiß die frage hört sich jetzt blöde an aber... warum kommt bei meinen Injectoren IMMER "Failed to inject" ? habe jetzt 5 Verschiedene ausprobiert.... keiner geht -.-' (Auch 4 Versch. .Dll's) Hoffe ihr könnt schnell helfen^^
Inject Code
01/15/2009 - Silkroad Online - 1 Replies
His guys i have my script and im looking for adding inside the script a skill code so when the bot goes back to town it casts grass walk for moving faster and getting the hell out of hotan cuz that place is really lag... i am looking for the inject code of the skill grass walk - flow lvl 10 and add it to the script. ty very much :):)



All times are GMT +1. The time now is 18:56.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.