Jump to content
Bekijk in de app

Een betere weg om onze GTA community te volgen. Leer meer.

GTAGames.nl - De Nederlandse Grand Theft Auto Community!

Een volledig scherm app op het beginscherm inclusief notificaties, badges en meer.

Om deze app op je iPhone en iPad te installeren
  1. Druk op het icoon in Safari
  2. Scroll in het menu en druk op Zet op beginscherm.
  3. Druk op Voeg toe rechts bovenaan.
Om deze app op je Android toe te voegen
  1. Druk op het 3-punten menu (⋮) rechts bovenaan in de browser.
  2. Druk op Toevoegen aan beginscherm of Installeer app.
  3. Druk op Toevoegen om te bevestigen.
Geplaatst:
comment_628079

Naar aanleiding van dit topic heb ik een kleine functie die een DLL injecteert gemaakt in C(++):

void InjectIt()
{
STARTUPINFO si;
PROCESS_INFORMATION pi;

char saPath[] = "C:\\Program Files\\Rockstar Games\\GTA San Andreas";
char saExe[] = "C:\\Program Files\\Rockstar Games\\GTA San Andreas\\gta_sa.exe";
char saDll[] = "C:\\TeInjecterenDLL.dll";

ZeroMemory(&si, sizeof(STARTUPINFO));
si.cb = sizeof(STARTUPINFO);

CreateProcess(
	saExe,
	NULL,
	NULL,
	NULL,
	FALSE,
	CREATE_SUSPENDED,
	NULL,
	saPath,
	&si,
	π);

PVOID lpRemoteLibName = VirtualAllocEx(pi.hProcess, NULL, MAX_PATH, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);
WriteProcessMemory(pi.hProcess, lpRemoteLibName, saDll, MAX_PATH, NULL);
HANDLE hRemoteThread = CreateRemoteThread(pi.hProcess, NULL, 0, (LPTHREAD_START_ROUTINE) GetProcAddress(GetModuleHandle("kernel32.dll"), "LoadLibraryA"), lpRemoteLibName, NULL, NULL);
WaitForSingleObject(hRemoteThread, INFINITE);
CloseHandle(hRemoteThread);
VirtualFreeEx(pi.hProcess, lpRemoteLibName, MAX_PATH, MEM_RELEASE);

ResumeThread(pi.hThread);
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);

}

Deze functie kun je als voorbeeld gebruiken voor je eigen injectiefuncties, al dan niet voor San Andreas, want deze methode werkt ook bij een heleboel andere programma's. Om deze functie direct te kunnen gebruiken zul je eerst de paden aan het begin van de functie aan moeten passen aan je eigen situatie. Je mag deze functie gebruiken in je eigen programma, maar als ik jou was zou ik hem wel aanpassen met foutcontrole en dergelijke (een handige tip, gebruik de functie 'GetExitCodeThread' op hRemoteThread om te kijken of het laden gelukt is).

Ik hoop dat iemand er wat aan heeft!

Featured Replies

No posts to show

Een reactie plaatsen

Je kan nu een reactie plaatsen en pas achteraf registreren. Als je al lid bent, log eerst in om met je eigen account een reactie te plaatsen.

Gast
Op dit onderwerp reageren...

Recent actief 0

  • Er zijn hier geen geregistreerde gebruikers aanwezig.

Configureer push berichten

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.