CrossFire Trainer... No Dlls
Hello guys,
Here we make hacks... .dll files which we inject... but how about making an application called "Trainer" which simply writes in the memory of CrossFire without any dlls ?
I tried but it didnt work... I think there is some mistake which me and @giniyat101, who i really want to thank can't find
so this is the sorce:
the problem is that i get error in read process memory index"299" means it is not completed fully + xtrap pop ups if i click on the console window
Here we make hacks... .dll files which we inject... but how about making an application called "Trainer" which simply writes in the memory of CrossFire without any dlls ?

I tried but it didnt work... I think there is some mistake which me and @giniyat101, who i really want to thank can't find

so this is the sorce:
Code:
/*-------------------------------v-DEFINES-v-----------------*/
#include <iostream>
#include <windows.h>
#include <psapi.h>
#include <string.h>
#include <string>
#pragma comment(lib, "psapi.lib")
using namespace std;
int main()
{
/*-------------------------------v-Waiting for CF window and printing some stuff-v----------*/
while (!FindWindowA("CrossFire", "CrossFire"))
{
cout<<"Waiting for CrossFire to start"<<endl;
Sleep(125);
system("cls");
cout<<"Waiting for CrossFire to start."<<endl;
Sleep(125);
system("cls");
cout<<"Waiting for CrossFire to start.."<<endl;
Sleep(125);
system("cls");
cout<<"Waiting for CrossFire to start..."<<endl;
Sleep(125);
system("cls");
}
/*-------------------------------v-Handling CF window-v----------*/
HWND windowHandle = FindWindowA("CrossFire", "CrossFire");
/*-------------------------------v-Getting proccess ID-v----------*/
DWORD processID = NULL;
GetWindowThreadProcessId(windowHandle, &processID);
if (!processID)
{
cout<<"Error finding pricess id."<<endl;
cout<<GetLastError()<<endl;
system("pause");
return 0;
}
/*-------------------------------v-handling crossfire process-v----------*/
HANDLE crossfire = OpenProcess(PROCESS_ALL_ACCESS,FALSE,(DWORD)processID);
if (!crossfire)
{
cout<<"Error opening the process."<<endl;
cout<<GetLastError()<<endl;
system("pause");
return 0;
}
/*-------------------------------v-searching for cshell-v----------*/
HMODULE hShell = NULL;
while (hShell == NULL)
{
HMODULE arrModules[150];
DWORD cbNeeded;
if (!EnumProcessModules(crossfire, arrModules, sizeof(arrModules), &cbNeeded))
{
cout<<"Error enumerating module handles."<<endl;
cout<<GetLastError()<<endl;
system("pause");
return 0;
}
char module[100];
for (int i = 0 ; i < cbNeeded/sizeof(HMODULE) ; i++)
{
GetModuleBaseNameA(crossfire,arrModules[i],module,100);
if (stricmp(module, "cshell.dll")==NULL)
{
hShell = arrModules[i];
break;
}
}
Sleep(100);
}
DWORD dw_Pointer = NULL;
float value = 150.0f;
for (int i = 0 ; i < 677 ; i++)
{
/*-------------------------------v-reading some memory(cshell + weapon mgr + reload addy + gun)-v----------*/
if (!ReadProcessMemory(crossfire,(hShell+((0xC25BC8+0xC38)+i*4)),&dw_Pointer,4,NULL))
{
cout<<"Error reading process memory."<<endl;
cout<<GetLastError()<<endl;
system("pause");
return 0;
}
/*-------------------------------v-writing some memory(cshell + weapon mgr + reload addy + gun)-v----------*/
if (dw_Pointer)
{
if (!WriteProcessMemory(crossfire,(LPVOID)(dw_Pointer),&value,4,NULL))
{
cout<<"Error writing process memory."<<endl;
cout<<GetLastError()<<endl;
}
}
}
/*-------------------------------v-closing handle-v----------*/
CloseHandle(crossfire);
system("pause");
return 0;
}
Nice Job, I hope it will work. So this is just a theory?
![=]](/forum/images/emotions/=].gif)
Well Yeah, I think it's possible, Keep it up! I'll be watching this if there's a solution 