Codes for Injector [Crossfire]

Posts 1–15 of 15 · Page 1 of 1
Codes for Injector [Crossfire]
Hello, MPGH

I Have a question can everbody send me Codes for Injector's?

Greetz RK
Quote Originally Posted by BACKD00R View Post


I think that old sources dont work!
it does, that's what everyone uses now
Quote Originally Posted by BACKD00R View Post


I think that old sources dont work!
It Works and it's The Newest Source Code For Injector
solved please close
@-*Koki-* lol you dont have the rights to say closed only minions can
no codes now
pls help
this is the first time i make injector and i need the codes 8/29/2012
Make Urs
Code:
#include <windows.h>
#include <tchar.h>
#include <tlhelp32.h>

DWORD FindProcessId(LPTSTR lpName)
{
	HANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, NULL);
	if (hSnap == INVALID_HANDLE_VALUE)
		return NULL;
	PROCESSENTRY32 prc32 = {sizeof(PROCESSENTRY32)};

	if (Process32First(hSnap, &prc32))
	{
		do
		{
			if (!_tcsicmp(prc32.szExeFile, lpName))
			{
				CloseHandle(hSnap);
				return prc32.th32ProcessID;
			}
		} while (Process32Next(hSnap, &prc32));
	}
	CloseHandle(hSnap);
	return NULL;
}

BOOL Inject(DWORD pid, LPCSTR dllpath)I
{
	HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid);
	if (!hProc == INVALID_HANDLE_VALUE)
		return FALSE;

	VOID* remoteStr = VirtualAllocEx(hProc, NULL, strlen(dllpath+1), MEM_COMMIT, PAGE_READWRITE);
	if (!remoteStr)
	{
		CloseHandle(hProc);
		return FALSE;
	}

	if (!WriteProcessMemory(hProc, remoteStr, dllpath, strlen(dllpath), NULL))
	{
		VirtualFreeEx(hProc, remoteStr, strlen(dllpath-1), MEM_RELEASE);
		CloseHandle(hProc);
		return FALSE;
	}

	LPTHREAD_START_ROUTINE locLLA = (LPTHREAD_START_ROUTINE)GetProcAddress(GetModuleHandleA("kernel32.dll"), "LoadLibraryA");
	if (!locLLA)
	{
		VirtualFreeEx(hProc, remoteStr, strlen(dllpath-1), MEM_RELEASE);
		CloseHandle(hProc);
		return FALSE;
	}

	HANDLE hThread = CreateRemoteThread(hProc, NULL, 0, locLLA, remoteStr, 0, NULL);
	if (!hThread)
	{
		VirtualFreeEx(hProc, remoteStr, strlen(dllpath-1), MEM_RELEASE);
		CloseHandle(hProc);
		return FALSE;
	}

	WaitForSingleObject(hThread, INFINITE);

	CloseHandle(hThread);
	VirtualFreeEx(hProc, remoteStr, strlen(dllpath-1), MEM_RELEASE);
	CloseHandle(hProc);
	return TRUE;
}
hope you got it..
Quote Originally Posted by giniyat101 View Post
Code:
#include <windows.h>
#include <tchar.h>
#include <tlhelp32.h>

DWORD FindProcessId(LPTSTR lpName)
{
	HANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, NULL);
	if (hSnap == INVALID_HANDLE_VALUE)
		return NULL;
	PROCESSENTRY32 prc32 = {sizeof(PROCESSENTRY32)};

	if (Process32First(hSnap, &prc32))
	{
		do
		{
			if (!_tcsicmp(prc32.szExeFile, lpName))
			{
				CloseHandle(hSnap);
				return prc32.th32ProcessID;
			}
		} while (Process32Next(hSnap, &prc32));
	}
	CloseHandle(hSnap);
	return NULL;
}

BOOL Inject(DWORD pid, LPCSTR dllpath)
{
	HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid);
	if (hProc == INVALID_HANDLE_VALUE)
		return FALSE;

	VOID* remoteStr = VirtualAllocEx(hProc, NULL, strlen(dllpath+1), MEM_COMMIT, PAGE_READWRITE);
	if (!remoteStr)
	{
		CloseHandle(hProc);
		return FALSE;
	}

	if (!WriteProcessMemory(hProc, remoteStr, dllpath, strlen(dllpath), NULL))
	{
		VirtualFreeEx(hProc, remoteStr, strlen(dllpath-1), MEM_RELEASE);
		CloseHandle(hProc);
		return FALSE;
	}

	LPTHREAD_START_ROUTINE locLLA = (LPTHREAD_START_ROUTINE)GetProcAddress(GetModuleHandleA("kernel32.dll"), "LoadLibraryA");
	if (!locLLA)
	{
		VirtualFreeEx(hProc, remoteStr, strlen(dllpath-1), MEM_RELEASE);
		CloseHandle(hProc);
		return FALSE;
	}

	HANDLE hThread = CreateRemoteThread(hProc, NULL, 0, locLLA, remoteStr, 0, NULL);
	if (!hThread)
	{
		VirtualFreeEx(hProc, remoteStr, strlen(dllpath-1), MEM_RELEASE);
		CloseHandle(hProc);
		return FALSE;
	}

	WaitForSingleObject(hThread, INFINITE);

	CloseHandle(hThread);
	VirtualFreeEx(hProc, remoteStr, strlen(dllpath-1), MEM_RELEASE);
	CloseHandle(hProc);
	return TRUE;
}
hope you got it..
thanks credits for you ^_^
Quote Originally Posted by itsmebadman View Post
Vb or C++
??
C++ Smart one -_-
Posts 1–15 of 15 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us