lynxpravoka Posted October 11, 2017 Posted October 11, 2017 Hi, is there a way to make ragexe when execute. it will call a program? i dont mean -1rag1. Quote
0 Haziel Posted October 11, 2017 Posted October 11, 2017 Not that I know of, but you can make your patcher or your launcher to call a .bat or a similar program to run both programs you want and the client. Quote
0 WhiteEagle Posted October 11, 2017 Posted October 11, 2017 Really? That would be awesome for intros o.o Quote
0 sader1992 Posted October 11, 2017 Posted October 11, 2017 (edited) NEMO Use Custom DLL you can put your things in the dll or make the dll call exe Edited October 11, 2017 by sader1992 Quote
0 lynxpravoka Posted October 12, 2017 Author Posted October 12, 2017 You know why i want this. i want to prevent malicous software to load ragexe. like hexeditor, wpe, packet analyzer. if its possible it can prevent it., Quote
0 lynxpravoka Posted October 12, 2017 Author Posted October 12, 2017 (edited) sader1992 is there sample dll source code to call a program? i have a console program that automatically kill a program in process that i don't want. the problem is how to make a ragexe as it execute it will launch that application too and it will automatically kill itself when ragexe not in process. Edited October 12, 2017 by lynxpravoka Quote
0 Ai4rei Posted October 12, 2017 Posted October 12, 2017 #include <windows.h> #include <tchar.h> DWORD CALLBACK RunMyApp(LPVOID lpParam) { STARTUPINFO Si = { sizeof(Si) }; PROCESS_INFORMATION Pi = { 0 }; if(CreateProcess(_T("myapp.exe"), _T("myapp.exe param1 param2"), NULL, NULL, FALSE, 0, NULL, NULL, &Si, &Pi)) { CloseHandle(Pi.hThread); CloseHandle(Pi.hProcess); } return 0; } BOOL CALLBACK DllMain(HINSTANCE hDll, DWORD dwReason, LPVOID lpReserved) { switch(dwReason) { case DLL_PROCESS_ATTACH: { DWORD dwThreadId; HANDLE hThread = CreateThread(NULL, 0, &RunMyApp, NULL, 0, &dwThreadId); if(hThread) { CloseHandle(hThread); } break; } } return TRUE; } Here's your sample code. Error handling has been omitted for brevity. Quote
0 lynxpravoka Posted October 12, 2017 Author Posted October 12, 2017 by the way i try your code i change value myapp.exe to cmd.exe and param 1 param 2 to ver. so the code like this #include <windows.h> #include <tchar.h> DWORD CALLBACK RunMyApp(LPVOID lpParam) { STARTUPINFO Si = { sizeof(Si) }; PROCESS_INFORMATION Pi = { 0 }; if(CreateProcess(_T("cmd.exe"), _T("cmd.exe ver"), NULL, NULL, FALSE, 0, NULL, NULL, &Si, &Pi)) { CloseHandle(Pi.hThread); CloseHandle(Pi.hProcess); } return 0; } BOOL CALLBACK DllMain(HINSTANCE hDll, DWORD dwReason, LPVOID lpReserved) { switch(dwReason) { case DLL_PROCESS_ATTACH: { DWORD dwThreadId; HANDLE hThread = CreateThread(NULL, 0, &RunMyApp, NULL, 0, &dwThreadId); if(hThread) { CloseHandle(hThread); } break; } } return TRUE; } and try to execute it directly from cmd.exe. the dll not call new cmd.exe with value ver to check ver cmd.exe. whats going on? Quote
1 Ai4rei Posted October 14, 2017 Posted October 14, 2017 I wonder how you execute a dll. That's not something you usually run on it's own, but link with a program. Quote
0 lynxpravoka Posted October 16, 2017 Author Posted October 16, 2017 I patch my client iwth load custom. and add my dll inside. if i'/m rong. how to suppose to work the dll? i see ragnashield can do that. Quote
Question
lynxpravoka
Hi, is there a way to make ragexe when execute. it will call a program? i dont mean -1rag1.
10 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.