CrossFire Trainer... No Dlls

Posts 1–15 of 36 · Page 1 of 3
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:

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;
}
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
psapi huh... This is new. If this one works, it's another headache for xtrap Nice Job, I hope it will work. So this is just a theory?
Quote Originally Posted by jmdante View Post
psapi huh... This is new. If this one works, it's another headache for xtrap Nice Job, I hope it will work. So this is just a theory?
read the red lines... i get some strange error + i am not sure if this will work
Quote Originally Posted by kmanev073 View Post
read the red lines... i get some strange error + i am not sure if this will work
Good luck with it
Quote Originally Posted by kmanev073 View Post
read the red lines... i get some strange error + i am not sure if this will work

I tried to make it an exe and got this error. Got a crazy idea of making it like a bypass, though I did logged in the gameroom but xtrap catched in in a few minutes Well Yeah, I think it's possible, Keep it up! I'll be watching this if there's a solution
Dude, you're not the only one who thought about it.
I did think about it once before, since my main programming language is C#, and if this is possible then you will be able to make CF hacks in any programming language.
I guess you will need an xTrap bypasser, since it might be detected
Good luck for you all.
Quote Originally Posted by h3llb0y2012 View Post
Dude, you're not the only one who thought about it.
I did think about it once before, since my main programming language is C#, and if this is possible then you will be able to make CF hacks in any programming language.
I guess you will need an xTrap bypasser, since it might be detected
Good luck for you all.
i also prefer C# but the dlls dont have entry point + i didnt know how to write memory with C# so i tried with C... it almost worked but yea i will try with bypass... to see maybe it will work on the login

299 error again... maybe i dont w8 for cshell fully let me make some changes
Quote Originally Posted by kmanev073 View Post
i also prefer C# but the dlls dont have entry point + i didnt know how to write memory with C# so i tried with C... it almost worked but yea i will try with bypass... to see maybe it will work on the login
For memory hacking in C#, you will just need to call functions from the system's API, such as WriteProcessMemory (in kernel32.dll) using the [DllImport] attribute.
Here's a link for a trainer example in C#: Cheat Engine :: View topic - C# Trainer Tutorial (With Example)

EDIT: You can find a lot easier tutorial on the web. Just google it.
anyway guys i tried starting the thingy on the login... no errors but nothing happens in game
Quote Originally Posted by kmanev073 View Post
anyway guys i tried starting the thingy on the login... no errors but nothing happens in game
Well, looks like it works as a dll after all. Gonna try it also after a little while
HAHAH guys see
Code:
487 (0x1E7)
Attempt to access invalid address.
i make some mistke in the adresses
We should stop using C++, and start using visual basic, Autoit, C# and Assembly
Quote Originally Posted by xKickAss View Post
We should stop using C++, and start using visual basic, Autoit, C# and Assembly
right, but xtrap is against read & writememory so there is no normal way to success with this trainer method
Quote Originally Posted by Code[Styler] View Post
right, but xtrap is against read & writememory so there is no normal way to success with this trainer method
there is... xtrap doesnt catch it fast... i mean you have 10 ms... or something....
Posts 1–15 of 36 · Page 1 of 3

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?