Solved Two questions/problems about tutorials

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

KR4N3N64

Newbie
Full Member
Oct 3, 2012
9
232
0
Hi all, the tutorials are awesome! but i have some problems..

1. I have made a dll for a game, but when i run the dll injector and the dll is injected successfuly, the game crashes and i dont know why?¿. I think my dll's code is the same that the Fleep's project. If i copy some codes of my project to Fleep's project, the dll works but i dont know why doesn't work my dll. Have you modified some project properties?

2. When i run the dll injector from debugger, it works fine!, but if i run the dll injector from the .exe file, it doesn't work for me.. why?

Sorry for my bad english... :)
 
Last edited:

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,371
78,998
2,414
Your DLL has the wrong offsets, update them.
 
Last edited:

KR4N3N64

Newbie
Full Member
Oct 3, 2012
9
232
0
C++:
#include <iostream>
#include <Windows.h>
#include <TlHelp32.h>

using namespace std;
bool InjectDLL(DWORD ProcessId);

char FileToInject[] = "ACubeDLL.dll";
char ProcessName[] = "ac_client.exe";
typedef HINSTANCE (*fpLoadLibrary)(char*);


int main()
{
	DWORD processId = NULL;

	PROCESSENTRY32 pe32 = {sizeof(PROCESSENTRY32)};
	HANDLE hProcSnap;


	while(!processId)
	{
		SetConsoleTitle("DLL Injector - Assault Cube");
		system("cls");
		cout << "Searching for" << ProcessName << "...." << endl;
		cout << "Make sure your game is running" << endl;
		hProcSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);

		if(Process32First(hProcSnap, &pe32))
		{
			do
			{
				if(!strcmp(pe32.szExeFile, ProcessName))
				{
					processId = pe32.th32ProcessID;
					break;
				}
			}
			while(Process32Next(hProcSnap, &pe32));
		}
		Sleep(1000);
	}


	while(!InjectDLL(processId))
	{
		SetConsoleTitle("DLL Injector - Assault Cube");
		system("CLS");
		cout << "DLL failed to inject" << endl;
		Sleep(1000);
	}

	cout << "DLL Injected successfuly!" << endl << endl;
	cout << "Closing Injector in 5 seconds" << endl;

	CloseHandle(hProcSnap);
	Sleep(5000);
	return 0;

}


bool InjectDLL(DWORD ProcessID)
{
	HANDLE hProc;
	LPVOID paramAddr;

	HINSTANCE hDLL = LoadLibrary("KERNEL32.lib");

	fpLoadLibrary LoadLibraryAddr = (fpLoadLibrary)GetProcAddress(hDLL, "LoadLibraryA");

	hProc = OpenProcess(PROCESS_ALL_ACCESS, false, ProcessID);

	char dllPath[250] = "C:\\HACKS\\";

	strcat(dllPath, FileToInject);

	paramAddr = VirtualAllocEx(hProc, 0, strlen(dllPath)+1, MEM_COMMIT, PAGE_READWRITE);
	bool memoryWritten = WriteProcessMemory(hProc, paramAddr, dllPath, strlen(dllPath)+1, NULL);

	CreateRemoteThread(hProc, 0, 0, (LPTHREAD_START_ROUTINE)LoadLibraryAddr, paramAddr, 0, 0);

	CloseHandle(hProc);
	return memoryWritten;

}
 

Tirade

Newbie
Oct 9, 2012
3
464
0
what game is it for? Try running the game in compatibility mode for windows xp SP2, then try it on Vista and inject your .dll
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods