php
19th September 2013, 16:52
http://killtube.org/attachment.php?attachmentid=459&d=1379610032
CoD 1.5 DLL
IDE: Code::Blocks
Inject with any injector you'd like.
DLL Download: http://filesmelt.com/dl/MDLL1.dll
#include "Windows.h"
#define COM_PRINTF 0x0437C00
DWORD WINAPI MyThread(LPVOID);
DWORD g_threadID;
HMODULE g_hModule;
typedef void ( *xcommand_t )( void );
typedef int (*Com_Printf_t)(const char *format, ...);
Com_Printf_t Com_Printf = (Com_Printf_t)COM_PRINTF;
void testFunc();
void Cmd_AddCommand(const char*, xcommand_t);
extern "C" BOOL APIENTRY DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
switch (fdwReason)
{
case DLL_PROCESS_ATTACH:
g_hModule = hinstDLL;
DisableThreadLibraryCalls(hinstDLL);
CreateThread(NULL, NULL, &MyThread, NULL, NULL, &g_threadID);
break;
case DLL_PROCESS_DETACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
break;
}
return true;
}
void patchCvars() {
DWORD old;
//Read Only
VirtualProtect((void*)0x43BCDA,1,PAGE_EXECUTE_READ WRITE,&old);
*((BYTE*)0x43BCDA) = 0xEB;
VirtualProtect((void*)0x43BCDA,1,old,&old);
//Write Protected
VirtualProtect((void*)0x43BD20,1,PAGE_EXECUTE_READ WRITE,&old);
*((BYTE*)0x43BD20) = 0xEB;
VirtualProtect((void*)0x43BD20,1,old,&old);
//Cheat Protected
VirtualProtect((void*)0x43BD20,1,PAGE_EXECUTE_READ WRITE,&old);
*((BYTE*)0x43BD20) = 0xEB;
VirtualProtect((void*)0x43BD20,1,old,&old);
//Credits to King-Orgy
}
DWORD WINAPI MyThread(LPVOID) {
patchCvars();
Cmd_AddCommand("testfunc", testFunc);
while(true)
{
if(GetAsyncKeyState(VK_LCONTROL) & 1) {
Com_Printf("Hello people %d\n", 1337);
}
Sleep(100);
}
FreeLibraryAndExitThread(g_hModule, 0);
return 0;
}
void testFunc() {
/*typedef void (__stdcall *outz)(const char*);
outz func2 = (outz) (0x080609D4);
func2("status");*/
//printf("hey");
//MessageBox(NULL, "Call of Duty MessageBox", "Call of Duty", MB_OK);
Com_Printf("Is this working? //php\n");
}
void Cmd_AddCommand(const char *cmd_name, xcommand_t function) {
void (*signature)(const char *cmd_name, xcommand_t function);
*((int *)(&signature)) = 0x042A870;
signature(cmd_name, function);
}
CoD 1.5 DLL
IDE: Code::Blocks
Inject with any injector you'd like.
DLL Download: http://filesmelt.com/dl/MDLL1.dll
#include "Windows.h"
#define COM_PRINTF 0x0437C00
DWORD WINAPI MyThread(LPVOID);
DWORD g_threadID;
HMODULE g_hModule;
typedef void ( *xcommand_t )( void );
typedef int (*Com_Printf_t)(const char *format, ...);
Com_Printf_t Com_Printf = (Com_Printf_t)COM_PRINTF;
void testFunc();
void Cmd_AddCommand(const char*, xcommand_t);
extern "C" BOOL APIENTRY DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
switch (fdwReason)
{
case DLL_PROCESS_ATTACH:
g_hModule = hinstDLL;
DisableThreadLibraryCalls(hinstDLL);
CreateThread(NULL, NULL, &MyThread, NULL, NULL, &g_threadID);
break;
case DLL_PROCESS_DETACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
break;
}
return true;
}
void patchCvars() {
DWORD old;
//Read Only
VirtualProtect((void*)0x43BCDA,1,PAGE_EXECUTE_READ WRITE,&old);
*((BYTE*)0x43BCDA) = 0xEB;
VirtualProtect((void*)0x43BCDA,1,old,&old);
//Write Protected
VirtualProtect((void*)0x43BD20,1,PAGE_EXECUTE_READ WRITE,&old);
*((BYTE*)0x43BD20) = 0xEB;
VirtualProtect((void*)0x43BD20,1,old,&old);
//Cheat Protected
VirtualProtect((void*)0x43BD20,1,PAGE_EXECUTE_READ WRITE,&old);
*((BYTE*)0x43BD20) = 0xEB;
VirtualProtect((void*)0x43BD20,1,old,&old);
//Credits to King-Orgy
}
DWORD WINAPI MyThread(LPVOID) {
patchCvars();
Cmd_AddCommand("testfunc", testFunc);
while(true)
{
if(GetAsyncKeyState(VK_LCONTROL) & 1) {
Com_Printf("Hello people %d\n", 1337);
}
Sleep(100);
}
FreeLibraryAndExitThread(g_hModule, 0);
return 0;
}
void testFunc() {
/*typedef void (__stdcall *outz)(const char*);
outz func2 = (outz) (0x080609D4);
func2("status");*/
//printf("hey");
//MessageBox(NULL, "Call of Duty MessageBox", "Call of Duty", MB_OK);
Com_Printf("Is this working? //php\n");
}
void Cmd_AddCommand(const char *cmd_name, xcommand_t function) {
void (*signature)(const char *cmd_name, xcommand_t function);
*((int *)(&signature)) = 0x042A870;
signature(cmd_name, function);
}