holy, i need help.

Posts 1–13 of 13 · Page 1 of 1
holy, i need help.
THIS CRAP IS SO ANNOYING AND I CANT FIGURE OUT WHY ITS HAPPENING, this is happening in my ProcMem.cpp
Code:
#include "Process.h"


using namespace std;

#pragma region Misc Functions

ProcMem::ProcMem(){

}

ProcMem::~ProcMem(){

	CloseHandle(hProcess);
}


int ProcMem::chSizeOfArray(char *chArray){


	for (int iLength = 1; iLength < MAX_PATH; iLength++)
		if (chArray[iLength] == '*')
			return iLength;

	cout << "\nLENGTH: Failed To Read Length Of Array\n";
	return 0;
}


int ProcMem::iSizeOfArray(int *iArray){


	for (int iLength = 1; iLength < MAX_PATH; iLength++)
		if (iArray[iLength] == '*')
			return iLength;

	cout << "\nLENGTH: Failed To Read Length Of Array\n";
	return 0;
}


bool ProcMem::iFind(int *iAry, int iVal){

	for (int i = 0; i < 64; i++)
		if (iVal == iAry[i] && iVal != 0)
			return true;

	return false;
}

#pragma endregion

#pragma region Memory Functions


void ProcMem::Process(char* ProcessName){


	HANDLE hPID = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, NULL);
	PROCESSENTRY32 ProcEntry;
	ProcEntry.dwSize = sizeof(ProcEntry);


	do
		if (!strcmp(ProcEntry.szExeFile, ProcessName))
		{

			dwPID = ProcEntry.th32ProcessID;
			CloseHandle(hPID);


			hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, dwPID);
			return;
		}
	while (Process32Next(hPID, &ProcEntry));

	cout << "\nanime hacks not initiated xdd\n";
	system("pause");
	exit(0);
}


void ProcMem::Patch(DWORD dwAddress, char *Patch_Bts, char *Default_Bts){


	int iSize = chSizeOfArray(Default_Bts);


	if (!bPOn)
		for (int i = 0; i < iSize; i++)
			Write<BYTE>(dwAddress + i, Patch_Bts[i]);
	else
		for (int i = 0; i < iSize; i++)
			Write<BYTE>(dwAddress + i, Default_Bts[i]);

	bPOn = !bPOn;
}


void ProcMem::Inject(DWORD dwAddress, char *Inj_Bts, char *Def_Bts, BOOL Type){


	int i_ISize = chSizeOfArray(Inj_Bts);
	int i_DSize = chSizeOfArray(Def_Bts);

	if (!bIOn)
	{

		if (i_DSize > 5)
			for (int i = 6; i < i_DSize; i++)
				Write<BYTE>(dwAddress + i, 0x90);
		else { cout << "\nINJECTION: Default Bytes Must Be More Than 5\n"; return; }


		dwCaveAddress = (DWORD)VirtualAllocEx(hProcess, NULL, i_ISize + 5, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);


		DWORD dwRetJmp = (dwAddress + i_DSize) - dwCaveAddress - 5;
		DWORD dwBaseJmp = dwCaveAddress - dwAddress - 5;


		for (int i = 0; i <= i_ISize; i++)
			Write<BYTE>(dwCaveAddress + i, Inj_Bts[i]);


		Write<BYTE>(dwCaveAddress + i_ISize, Type ? 0xE9 : 0xE8);
		Write<DWORD>(dwCaveAddress + i_ISize + 1, dwRetJmp);


		Write<BYTE>(dwAddress, Type ? 0xE9 : 0xE8);
		Write<DWORD>(dwAddress + 1, dwBaseJmp);

	}
	else{

		for (int i = 0; i < i_DSize; i++)
			Write<BYTE>(dwAddress + i, Def_Bts[i]);


		VirtualFreeEx(hProcess, (LPVOID)dwCaveAddress, i_ISize + 5, MEM_DECOMMIT);
	}
	bIOn = !bIOn;
}


DWORD ProcMem::AOB_Scan(DWORD dwAddress, DWORD dwEnd, char *Bytes){


	int iBytesToRead = 0, iTmp = 0;
	int length = chSizeOfArray(Bytes);
	bool bTmp = false;


	if (Bytes[0] == '?')
	{
		for (; iBytesToRead < MAX_PATH; iBytesToRead++)
			if (Bytes[iBytesToRead] != '?')
			{
				iTmp = (iBytesToRead + 1);
				break;
			}
	}


	for (; dwAddress < dwEnd; dwAddress++)
	{
		if (iBytesToRead == length)
			return dwAddress - iBytesToRead;

		if (Read<BYTE>(dwAddress) == Bytes[iBytesToRead] || (bTmp && Bytes[iBytesToRead] == '?'))
		{
			iBytesToRead++;
			bTmp = true;
		}
		else
		{
			iBytesToRead = iTmp;
			bTmp = false;
		}
	}

	cout << "\nAOB_SCAN: Failed To Find Byte Pattern\n";
	return 0;
}


DWORD ProcMem::Module(LPSTR ModuleName){


	HANDLE hModule = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, dwPID);
	MODULEENTRY32 mEntry;
	mEntry.dwSize = sizeof(mEntry);


	do
		if (!strcmp(mEntry.szModule, ModuleName))
		{
			CloseHandle(hModule);
			return (DWORD)mEntry.modBaseAddr;
		}
	while (Module32Next(hModule, &mEntry));

	cout << "\nCouldn't find client.dll, retrying...\n";
	return 0;
}

#pragma endregion
here are the errors I get

Code:
Error	1	error C2664: 'int strcmp(const char *,const char *)' : cannot convert argument 1 from 'WCHAR [260]' to 'const char *'	c:\Users\Jones\documents\visual studio 2013\Projects\weeaboohowl\weeaboohowl\Process.cpp	65	1	weeaboohowl
Code:
Error	2	error C2664: 'int strcmp(const char *,const char *)' : cannot convert argument 1 from 'WCHAR [256]' to 'const char *'	c:\Users\Jones\documents\visual studio 2013\Projects\weeaboohowl\weeaboohowl\Process.cpp	196	1	weeaboohowl
Code:
Error	2	error C2664: 'int strcmp(const char *,const char *)' : cannot convert argument 1 from 'WCHAR [256]' to 'const char *'	c:\Users\Jones\documents\visual studio 2013\Projects\weeaboohowl\weeaboohowl\Process.cpp	196	1	weeaboohowl
Code:
	3	IntelliSense: argument of type "WCHAR *" is incompatible with parameter of type "const char *"	c:\Users\Jones\Documents\Visual Studio 2013\Projects\weeaboohowl\weeaboohowl\Process.cpp	65	15	weeaboohowl
Code:
	4	IntelliSense: argument of type "WCHAR *" is incompatible with parameter of type "const char *"	c:\Users\Jones\Documents\Visual Studio 2013\Projects\weeaboohowl\weeaboohowl\Process.cpp	196	15	weeaboohowl
please help im working inside an CLR empty project. i had trouble finding how to work with UI forms, so i opened up WasserEssers source, and saw how he created threads, enabled visual styles, so i started using Main as my entry point, and i basically did what he did in my own project (no i didn't copy paste his code, im just trying to figure out how to use UI forms,but, i literally took HIS FUCKING MEMORY CLASS, AND PASTED IT IN, NOTHING IS DIFFERENT, IT JUST WONT WORK AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH its literally the same thing, i used the memory class in my other project, where i used int main as my entry point, and was in a empty project, this happens inside my CLR project, SubSystem is Windows, and my entry point is main, if that even has any thing to do with it.
Quote Originally Posted by sup h0wl View Post
no i didn't copy paste his code
Quote Originally Posted by sup h0wl View Post
i literally took HIS FUCKING MEMORY CLASS, AND PASTED IT IN, NOTHING IS DIFFERENT
k den.

Go to your project properties and change the character set to multi-byte.

People got to stop using this class and make their own.
Quote Originally Posted by Chris View Post


k den.

Go to your project properties and change the character set to multi-byte.

People got to stop using this class and make their own.
thanks a lot, it compiled correctly, this is kind of irrelevant, but when i do compile it, even when i compile WasserEssers, i just get a box that says cmd.exe, and "press any key to continue"
Quote Originally Posted by sup h0wl View Post
thanks a lot, it compiled correctly, this is kind of irrelevant, but when i do compile it, even when i compile WasserEssers, i just get a box that says cmd.exe, and "press any key to continue"
Screenshot?
How are you compiling it, Ctrl+Shift+B (Build solution)?


like I said this happens when I compile the invincible source aswell. ill go to my project directory and run the program from there, still displays the cmd prompt window, ill try it on my other computer to see if it is a problem with this computer

- - - Updated - - -

Quote Originally Posted by Chris View Post

Screenshot?
How are you compiling it, Ctrl+Shift+B (Build solution)?
oops forgot to quote you -__(O_O)__-

- - - Updated - - -
@Chris sorry im actually retarded, I didn't have cs go open, that didn't hit me in the head til now, im retarded
while(!mem.Attach("csgo.exe") {
if (!mem.Attach("csgo.exe") {
MSGBOX... ("open csgo first")
std::terminate(); //there is other code for it but the VS is closed so i will not open to look

Why not?
Quote Originally Posted by PhY'z View Post
while(!mem.Attach("csgo.exe") {
if (!mem.Attach("csgo.exe") {
MSGBOX... ("open csgo first")
std::terminate(); //there is other code for it but the VS is closed so i will not open to look

Why not?
It's probably in his main entry point so could just return 1.
Quote Originally Posted by Chris View Post

It's probably in his main entry point so could just return 1.
You are the guy that i have to thanks for all I learned from you almost everything, now i can code alone (:
Thx
lmao gotta learn to accomplish things.
Quote Originally Posted by Epik View Post
Jesus please learn to code before making a thread to fix something so simple
/'refuckingretarded

- - - Updated - - -

Quote Originally Posted by 4nuoFZf9aE View Post
lmao gotta learn to accomplish things.
didn't think about where the error could be coming from
Quote Originally Posted by sup h0wl View Post
/'refuckingretarded

- - - Updated - - -



didn't think about where the error could be coming from
I wasnt talking about you lmao. xD
Quote Originally Posted by 4nuoFZf9aE View Post
I wasnt talking about you lmao. xD
oh, btw i didn't call YOU retarded, just making sure you know that lol
Jesus please learn to code before making a thread to fix something so simple
Posts 1–13 of 13 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us