Detected internal

Posts 1–10 of 10 · Page 1 of 1
Detected internal
So I made internal hack using SnorFlake's SDK and instantly got VAC.... just using his hook on create move.

Well and I am asking how to make it undetected ... (what to watch out for).


Hooks.h



Code:
#pragma once
#include "sdk.h"

#define M_RADPI 57.295779513082

typedef void(__stdcall* CreateMoveFn)(int, float, bool);
CreateMoveFn oCreateMove;

typedef void(__cdecl *MsgFn)(char const* pMsg, va_list);
void __cdecl Msg(char const* msg, ...)
{
	static MsgFn oMsg = (MsgFn)GetProcAddress(GetModuleHandle("tier0.dll"), "Msg");
	char buffer[989];
	va_list list;
	va_start(list, msg);
	vsprintf(buffer, msg, list);
	va_end(list);
	oMsg(buffer, list);
}


void LeftClick()
{
	INPUT    Input = { 0 };
	// left down 
	Input.type = INPUT_MOUSE;
	Input.mi.dwFlags = MOUSEEVENTF_LEFTDOWN;
	::SendInput(1, &Input, sizeof(INPUT));

	// left up
	::ZeroMemory(&Input, sizeof(INPUT));
	Input.type = INPUT_MOUSE;
	Input.mi.dwFlags = MOUSEEVENTF_LEFTUP;
	::SendInput(1, &Input, sizeof(INPUT));
}


void CalcAngle(Vector& src, Vector& dst, Vector& angles, CBaseEntity* ent)
{
	Vector MyPunch = ent->Punch();
	double delta[3] = { (src.x - dst.x), (src.y - dst.y), (src.z - dst.z) };
	double hyp = sqrt(delta[0] * delta[0] + delta[1] * delta[1]);
	angles.x = (float)(atan(delta[2] / hyp) * M_RADPI - MyPunch.x  * 2.0f);
	angles.y= (float)(atan(delta[1] / delta[0]) * M_RADPI - MyPunch.y  * 2.0f);
	angles.z = 0.0f;
	if (delta[0] >= 0.0) {
		angles.y += 180.0f;
	}
}


bool silent;
void __stdcall hkCreateMove(int sequence_number,
	float input_sample_frametime,
	bool active)
{
	oCreateMove(sequence_number, input_sample_frametime, active);
	CUserCmd* cmdlist = *(CUserCmd**)((DWORD)Interfaces.Input + 0xEC);
	CUserCmd* cmd = &cmdlist[sequence_number % 150];
	//Work here
	CBaseEntity* me = Interfaces.ClientEntList->GetClientEntity(Interfaces.Engine->GetLocalPlayer());
	if (!me)
		return;

	if (GetAsyncKeyState(VK_END))
	{
		silent = !silent;
		if (silent)
			Msg("Silent on!\n");
		else
			Msg("Silent off!\n");
	}
	if (me->GetFlags() & FL_ONGROUND && me->GetCrossId() != 0 && me->GetCrossId() <= Interfaces.Globals->maxClients && GetAsyncKeyState(VK_MBUTTON) & 0x8000)
	{
		CBaseEntity* enemy = Interfaces.ClientEntList->GetClientEntity(me->GetCrossId());
		if(enemy->GetTeamNum() != me->GetTeamNum())
			LeftClick();
	}
	if (silent && me->GetFlags() & FL_ONGROUND && me->GetCrossId() != 0 && me->GetCrossId() <= Interfaces.Globals->maxClients && cmd->buttons & IN_ATTACK)
	{
		CBaseEntity* enemy = Interfaces.ClientEntList->GetClientEntity(me->GetCrossId());
		if (enemy->GetTeamNum() != me->GetTeamNum())
		{
			Vector AimAngles;
			Vector HeadPos;
			//GetBonePosition(enemy, HeadPos, 10);
			CalcAngle(me->GetEyePosition(), enemy->GetEyePosition(), AimAngles, me);
			//printf("Headpos: %g, %g, %g\n", HeadPos.x, HeadPos.y, HeadPos.z);
			cmd->viewangles = AimAngles;
		}
	}
	//Stop work here
	CVerifiedUserCmd* verifiedlist = *(CVerifiedUserCmd**)((DWORD)Interfaces.Input + 0xF0);
	CVerifiedUserCmd* verified = &verifiedlist[sequence_number % 150];
	verified->m_cmd = *cmd;
	verified->m_crc = gCRC.CRC32_ProcessSingleBuffer(cmd, sizeof(cmd));
}




/*
typedef void* (__stdcall* PaintTraverseFn)(void*, unsigned int, bool, bool);

PaintTraverseFn oCreatePaint;

void __fastcall Hooked_PaintTraverse(
	void *thisptr,
	void * _EDX, 
	unsigned int vguiPanel, 
	bool forceRepaint, 
	bool allowForce)
{


}
*/


class CHooks
{
public:
	void Hook()
	{
		CVMTHookManager* ClientHook = new CVMTHookManager(Interfaces.Client);
		oCreateMove = (CreateMoveFn)ClientHook->HookFunction(21, hkCreateMove);
		ClientHook->HookTable(true);
		/*
		CVMTHookManager* ClientHook1 = new CVMTHookManager(Interfaces.Client);
		oCreatePaint = (PaintTraverseFn)ClientHook1->HookFunction(41, Hooked_PaintTraverse);
		ClientHook1->HookTable(true);
		*/
	}
};
CHooks Hooks;

Thanks in Advance
Make your own hook?

If you can't make your own hook, you are just a copy paster. (considering your last releases).
Is that AimBOT? maybe you ""made"" something wrong with the calculation angles, and since you "copy"-it i think that was proposital from the author, for the guys who copy and dont even check, take a ban instant, btw next time use -insecure and see if is working...
It worked like a charm. I never said it didn't. I am asking what are the thing I have to look for when making internal hack.
You got banned because you don't clamp your angles.
Quote Originally Posted by gtaplayer2 View Post
You got banned because you don't clamp your angles.
What do you mean. (Bad english)
Anyway thanks for answer.
Quote Originally Posted by jjjamer View Post
What do you mean. (Bad english)
Anyway thanks for answer.
VAC checks if you're angles are invalid, if they are, you get banned.

Code:
void ClampAngle(QAngle &SrcAngles)
{
	if (SrcAngles.x > 89.0f && SrcAngles.x <= 180.0f)
	{
		SrcAngles.x = 89.0f;
	}
	if (SrcAngles.x > 180.f)
	{
		SrcAngles.x -= 360.f;
	}
	if (SrcAngles.x < -89.0f)
	{
		SrcAngles.x = -89.0f;
	}
	if (SrcAngles.y > 180.f)
	{
		SrcAngles.y -= 360.f;
	}
	if (SrcAngles.y < -180.f)
	{
		SrcAngles.y += 360.f;
	}
	if (SrcAngles.z != 0.0f)
	{
		SrcAngles.z = 0.0f;
	}
}
To use it.

CalcAngle(args);
ClampAngles(AngleYouWillUseToOverwriteCurrentAngle );
SetViewAngles(AngleYouWillUseToOverwriteCurrentAng le);
Quote Originally Posted by gtaplayer2 View Post
VAC checks if you're angles are invalid, if they are, you get banned.

Code:
void ClampAngle(QAngle &SrcAngles)
{
	if (SrcAngles.x > 89.0f && SrcAngles.x <= 180.0f)
	{
		SrcAngles.x = 89.0f;
	}
	if (SrcAngles.x > 180.f)
	{
		SrcAngles.x -= 360.f;
	}
	if (SrcAngles.x < -89.0f)
	{
		SrcAngles.x = -89.0f;
	}
	if (SrcAngles.y > 180.f)
	{
		SrcAngles.y -= 360.f;
	}
	if (SrcAngles.y < -180.f)
	{
		SrcAngles.y += 360.f;
	}
	if (SrcAngles.z != 0.0f)
	{
		SrcAngles.z = 0.0f;
	}
}
To use it.

CalcAngle(args);
ClampAngles(AngleYouWillUseToOverwriteCurrentAngle );
SetViewAngles(AngleYouWillUseToOverwriteCurrentAng le);
And what about you open your cs, and you cant look around, you open console and see something like angles rejected, and you have 0 cheats on, you restart the game, you play 3 matches and gets banned for untrusted, and then you see it's you main account??
Happened to me right now, i never cheated on my main, since it haD skins there... (Valve gave me my b-day present... a ban)...

Btw just complementing the ban explanation... stills can't get why banned...
Quote Originally Posted by PhY'z View Post
And what about you open your cs, and you cant look around, you open console and see something like angles rejected, and you have 0 cheats on, you restart the game, you play 3 matches and gets banned for untrusted, and then you see it's you main account??
Happened to me right now, i never cheated on my main, since it haD skins there... (Valve gave me my b-day present... a ban)...

Btw just complementing the ban explanation... stills can't get why banned...
Lol Happend to me 2, The 0 thingy. But havent got banned.
- - - Updated - - -

Quote Originally Posted by PhY'z View Post
And what about you open your cs, and you cant look around, you open console and see something like angles rejected, and you have 0 cheats on, you restart the game, you play 3 matches and gets banned for untrusted, and then you see it's you main account??
Happened to me right now, i never cheated on my main, since it haD skins there... (Valve gave me my b-day present... a ban)...

Btw just complementing the ban explanation... stills can't get why banned...
Thanks Btw Will this work?:

Code:
Vector ClampAnglesQ(Vector& angles) 
{
	while (angles.y > 180)
		angles.y -= 360;
	while (angles.y < -180)
		angles.y += 360;
	if (angles.x > 89.0f)
		angles.x = 89.0f;
	if (angles.x < -89.0f)
		angles.x = -89.0f;
	angles.z = 0;
	return angles;
}
- - - Updated - - -

Quote Originally Posted by gtaplayer2 View Post
VAC checks if you're angles are invalid, if they are, you get banned.

Code:
void ClampAngle(QAngle &SrcAngles)
{
	if (SrcAngles.x > 89.0f && SrcAngles.x <= 180.0f)
	{
		SrcAngles.x = 89.0f;
	}
	if (SrcAngles.x > 180.f)
	{
		SrcAngles.x -= 360.f;
	}
	if (SrcAngles.x < -89.0f)
	{
		SrcAngles.x = -89.0f;
	}
	if (SrcAngles.y > 180.f)
	{
		SrcAngles.y -= 360.f;
	}
	if (SrcAngles.y < -180.f)
	{
		SrcAngles.y += 360.f;
	}
	if (SrcAngles.z != 0.0f)
	{
		SrcAngles.z = 0.0f;
	}
}
To use it.

CalcAngle(args);
ClampAngles(AngleYouWillUseToOverwriteCurrentAngle );
SetViewAngles(AngleYouWillUseToOverwriteCurrentAng le);
Helpful Thanks!!
Posts 1–10 of 10 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us