Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > General Coding
You last visited: Today at 11:54

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

Advertisement



Check DEP Status

Discussion on Check DEP Status within the General Coding forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2011
Posts: 35
Received Thanks: 123
Post Check DEP Status

Hey weis jemand wie man abfragen kann ob der dep dienst eingeschlatet oder abgeschlatet ist? vorzugsweise in c++ oder c#
oder wie ich eine dll mit virtual protect schreibe das es garnicht nötig ist den dep dienst abzuschalten ?
vielen dank für eure antworten
insert-name-here is offline  
Old 02/17/2012, 17:14   #2
 
Dr. Coxxy's Avatar
 
elite*gold: 0
Join Date: Feb 2011
Posts: 1,206
Received Thanks: 736
nehme an, du benutzst die bekannte detour funktion...

lies dir mal die msdn seite von virtualprotect durch, dann setze die entsprechenden rechte auf das trampolin && fertig.
Dr. Coxxy is offline  
Old 02/18/2012, 12:03   #3
 
elite*gold: 0
Join Date: Dec 2011
Posts: 35
Received Thanks: 123
Code:
void* DetourFunc(BYTE *src, const BYTE *dst, const int len)		//saved <len> bytes in ein trampolin, überschreibt die ersten 5 bytes der originalfunktion mit einem jump auf die hookfunktion und gibt einen pointer auf das trampolin zurück, der die gesicherten bytes und einen jump auf die originalfunktion NACH dem hook beinhaltet.
{
	BYTE *jmp = (BYTE*)malloc(len+5);
	DWORD dwback;
	VirtualProtect(src, len, PAGE_READWRITE, &dwback);
	memcpy(jmp, src, len);
	jmp += len;
	jmp[0] = 0xE9;
	*(DWORD*)(jmp+1) = (DWORD)(src+len - jmp) - 5;
	src[0] = 0xE9;
	*(DWORD*)(src+1) = (DWORD)(dst - src) - 5;
	VirtualProtect(src, len, dwback, &dwback);
	return (jmp-len);
}
das ist meine detour funktion weis aber nicht was ich da noch ändern soll ^^
insert-name-here is offline  
Old 02/18/2012, 12:35   #4
 
Dr. Coxxy's Avatar
 
elite*gold: 0
Join Date: Feb 2011
Posts: 1,206
Received Thanks: 736
überleg doch mal...

was ist immoment das problem?
das allokierte trampolin "jmp" wird mit den gespeicherten opcodes und einem jump ausgeführt.
blöd, dass allokierter speicher standardmäßig keine execute rechte hat, sondern wie DEP schon sagt (Data execution prevention), sondern ist Data.
also musst du dem jump nun mit virtualprotect auch ausführungsrechte geben.
wenn du das nicht hinkriegst, lern bitte erstmal ordentlich c/c++ oder mach was einfacheres...
Dr. Coxxy is offline  
Old 02/19/2012, 17:26   #5
 
elite*gold: 9
Join Date: Dec 2009
Posts: 1,071
Received Thanks: 819
Quote:
Originally Posted by http://msdn.microsoft.com/en-us/library/windows/desktop/aa366786%28v=vs.85%29.aspx
PAGE_EXECUTE_READWRITE
(0x40)

Enables execute, read-only, or read/write access to the committed region of pages.
...
.Infinite is offline  
Reply


Similar Threads Similar Threads
How to change the server status from Check to Open?
10/13/2011 - SRO Private Server - 1 Replies
as the title says ... only 1 answer should be enough!
[HOW TO] Port Check für Online Status
06/20/2010 - Metin2 PServer Guides & Strategies - 24 Replies
Hey.... Da mich viele gefragt haben wie ein Online Status funktioniert, also das es auf der HP immer geändert wird, werde ich es hier mal erklären..... Da ich per SuFu nichts gefunden habe like this habe ich es mal gemacht --> 1. Ihr geht auf --> blackout-gaming 2. Für MySQL tragt ihr dort alles ein --> IP bzw DynDNS und als Port --> 3306
Why does ECSRO says status as Check?
01/02/2010 - SRO Private Server - 15 Replies
Why does the ECSRO VIP server say status Check?
Server status check???
12/17/2009 - CO2 Private Server - 1 Replies
When I try to use a server status checker it tells me my server is offline when it isn`t, I use an Hamachi IP but what port is it supposed to be? I mean when I go to a site to check the server status thing it asks for an IP (Hamachi) but it asks for a port also so what port is it I should put in so that it tells me my server is online? I am using 5165 source. The only thing that says port is the 8080 thing but even with that number it tells me server is offline :( Nevermind problem is sorted ...
L2W - how to check char's attack status
08/30/2009 - Lineage 2 - 1 Replies
Hi all. Sory for my english... I know only basic words :) I'm making a script, and i have a problem. I need to check, is that my char is attacked. I tryed to check this with: -------------------------- Label(sit) Set(L2Walker,Disable) Set(Fightstop) ChangeWaitType(0) delay(5000)



All times are GMT +1. The time now is 11:55.


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.