kitterz Grandmaster Cheater Supreme
Reputation: 0
Joined: 24 Dec 2007 Posts: 1268
|
Posted: Wed Aug 06, 2008 1:45 pm Post subject: [Help] Reset with my Injector |
|
|
I have this Injector source that im working on...and studying. I found this on the internet. I am injecting Test.dll into MapleStory.exe
It injects fine, and I know the dll is not the problem, but it still resets my comp when GG loads. How can I fix this?
Am I somehow leaving something behind in MapleStory that GG detects? Or what?
Thanks.
| Code: |
DWORD GetPid(){
HANDLE hProc;
PROCESSENTRY32 peProcess;
hProc = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
while(Process32Next(hProc, &peProcess)){
if(!strcmp(peProcess.szExeFile, "MapleStory.exe")){
CloseHandle (hProc);
return peProcess.th32ProcessID;
}
}
CloseHandle (hProc);
return -1;
}
//Inject a Dll into process
int InjectDll(DWORD dwPid){
HANDLE hProc;
DWORD dwMemSize, dwWritten, dwThreadId;
FARPROC hLoadLibrary;
LPVOID hRemoteMem;
char cDllPath [260];
GetCurrentDirectory(260, cDllPath);
strcat(cDllPath, "\\Test.dll");
hProc = OpenProcess(PROCESS_VM_OPERATION | PROCESS_VM_WRITE | PROCESS_CREATE_THREAD, FALSE, dwPid);
if(hProc != NULL){
dwMemSize = strlen(cDllPath);
hLoadLibrary = GetProcAddress(GetModuleHandleA("kernel32.dll"), "LoadLibraryA");
if(hLoadLibrary != NULL){
hRemoteMem = VirtualAllocEx(hProc, NULL, dwMemSize, MEM_COMMIT, PAGE_READWRITE);
if(hRemoteMem != NULL){
if(WriteProcessMemory(hProc, hRemoteMem, (LPVOID)cDllPath, dwMemSize, &dwWritten)){
if(CreateRemoteThread(hProc, NULL, 0, (LPTHREAD_START_ROUTINE)hLoadLibrary, hRemoteMem, 0, &dwThreadId) != NULL){
CloseHandle (hProc);
return 0;
}
}
}
}
}
CloseHandle (hProc);
return 1;
} |
|
|