every sdk header is in "sdk.h" now

This commit is contained in:
nullifiedcat 2016-12-05 16:10:23 +03:00
parent 6ee2935a62
commit 3c3409b6e1
32 changed files with 261 additions and 149 deletions

View File

@ -3,6 +3,8 @@ MAX -> MIN priority
AirStuck FIX
FIX Followbot Crash
Huntsman autoshoot
Aim Stickies
Proj Aim Buildings
no aim sapper/banner
Triggerbot ignores vaccinator ubers
Proper ambassador detection (not just CTFRevolver)

View File

@ -9,13 +9,7 @@
#include "interfaces.h"
#include "logging.h"
#include "fixsdk.h"
#include <vgui/ISurface.h>
#include <Color.h>
#include <cdll_int.h>
#include <mathlib/vmatrix.h>
#include <cassert>
#include <icliententity.h>
#include "sdk.h"
int g_nStringsSide = 0;
int g_nStringsCenter = 0;

View File

@ -16,8 +16,8 @@ typedef unsigned int offset_t;
template<typename T>
inline T GetEntityValue(IClientEntity* ent, unsigned int offset) {
int null = 0;
if (ent == 0) return *(reinterpret_cast<T*>(&null));
int nullv = 0;
if (ent == 0) return *(reinterpret_cast<T*>(&nullv));
//logging::Info("GetEntityValue 0x%08x, 0x%08x", ent, offset);
return *(reinterpret_cast<T*>((unsigned int)ent + offset));
}

View File

@ -15,11 +15,7 @@
#include "playerresource.h"
#include "helpers.h"
#include "fixsdk.h"
#include <icliententitylist.h>
#include <Color.h>
#include <icliententity.h>
#include <client_class.h>
#include "sdk.h"
CachedEntity::CachedEntity() {
m_pEntity = nullptr;

View File

@ -9,9 +9,6 @@
#include "hack.h"
#include "fixsdk.h"
#include <tier1/convar.h>
pthread_mutex_t mutex_quit;
pthread_t thread_main;

View File

@ -17,6 +17,7 @@ void GlobalSettings::Init() {
this->bNoZoom = CreateConVar("u_nozoom", "1", "No Zoom");
this->bNoFlinch = CreateConVar("u_noflinch", "0", "No-Flinch");
this->bSendPackets = CreateConVar("u_sendpackets", "1", "Send packets");
this->bShowLogo = CreateConVar("u_logo", "1", "Show logo");
}
GlobalSettings g_Settings;

View File

@ -21,6 +21,7 @@ public:
ConVar* bNoZoom;
ConVar* bNoFlinch;
ConVar* bSendPackets;
ConVar* bShowLogo;
};
extern GlobalSettings g_Settings;

View File

@ -16,59 +16,48 @@
#include <cstring>
#include <memory>
// All Hacks
#include "hacks/IHack.h"
#include "hacks/Aimbot.h"
#include "hacks/Airstuck.h"
#include "hacks/AntiAim.h"
#include "hacks/AntiDisguise.h"
#include "hacks/AutoHeal.h"
#include "hacks/AutoReflect.h"
#include "hacks/AutoSticky.h"
#include "hacks/AutoStrafe.h"
#include "hacks/Bunnyhop.h"
#include "hacks/ESP.h"
#include "hacks/FollowBot.h"
#include "hacks/HuntsmanCompensation.h"
#include "hacks/Misc.h"
#include "hacks/SpyAlert.h"
#include "hacks/Trigger.h"
#include "interfaces.h"
#include "sharedobj.h"
#include "entitycache.h"
#include "sdk/in_buttons.h"
#include "logging.h"
#include "hooks.h"
#include "hacks/IHack.h"
#include "helpers.h"
#include "followbot/ipcctl.h"
#include "hacks/AutoReflect.h"
#include "hacks/AntiAim.h"
#include "hacks/Misc.h"
#include "hacks/AntiDisguise.h"
#include "usercmd.h"
#include "drawing.h"
#include "hacks/Airstuck.h"
#include "hacks/AutoStrafe.h"
#include "hacks/AutoSticky.h"
#include "entity.h"
#include "localplayer.h"
#include "playerresource.h"
#include "targeting/ITargetSystem.h"
#include "hacks/AutoHeal.h"
#include "profiler.h"
#include <csignal>
#include "fixsdk.h"
#include <tier1/convar.h>
#include <igameevents.h>
#include <icliententitylist.h>
#include <cdll_int.h>
#include <engine/IEngineTrace.h>
#include <icliententity.h>
#include <cmodel.h>
#include <client_class.h>
#include <vgui/ISurface.h>
#include <vgui/IPanel.h>
#include <convar.h>
#include <Color.h>
#include <view_shared.h>
#include <icvar.h>
#include <inetchannel.h>
#include "sdk.h"
#include "copypasted/CSignature.h"
#include "copypasted/Netvar.h"
#include "CDumper.h"
#include "hacks/FollowBot.h"
#include "globals.h"
#include "hacks/Aimbot.h"
#include "hacks/Bunnyhop.h"
#include "hacks/ESP.h"
#include "hacks/Trigger.h"
/*
* Credits to josh33901 aka F1ssi0N for butifel F1Public and Darkstorm 2015 Linux
@ -109,6 +98,10 @@ void hack::Hk_PaintTraverse(void* p, unsigned int vp, bool fr, bool ar) {
if (hack::invalidated) return;
if (draw::panel_top == vp) {
ResetStrings();
if (g_Settings.bShowLogo->GetBool()) {
AddSideString(colors::green, colors::black, "cathook by d4rkc4t");
AddSideString(colors::green, colors::black, "build " __DATE__ " " __TIME__);
}
for (IHack* i_hack : hack::hacks) {
//PROF_BEGIN();
i_hack->PaintTraverse(p, vp, fr, ar);
@ -180,6 +173,7 @@ bool hack::Hk_CreateMove(void* thisptr, float inputSample, CUserCmd* cmd) {
g_phFollowBot->CreateMove(thisptr, inputSample, cmd);
g_phMisc->CreateMove(thisptr, inputSample, cmd);
g_phTriggerbot->CreateMove(thisptr, inputSample, cmd);
g_phHuntsmanCompensation->CreateMove(thisptr, inputSample, cmd);
/*for (IHack* i_hack : hack::hacks) {
if (!i_hack->CreateMove(thisptr, inputSample, cmd)) {
@ -257,6 +251,7 @@ void hack::InitHacks() {
ADD_HACK(AutoSticky);
ADD_HACK(Airstuck);
ADD_HACK(AutoHeal);
ADD_HACK(HuntsmanCompensation);
}
void hack::Initialize() {

View File

@ -18,16 +18,7 @@
#include "../targeting/TargetSystemFOV.h"
#include "../targeting/TargetSystemDistance.h"
#include "../fixsdk.h"
#include <client_class.h>
#include <inetchannelinfo.h>
#include <icliententity.h>
#include <icliententitylist.h>
#include <cdll_int.h>
#include <gametrace.h>
#include <engine/IEngineTrace.h>
#include <globalvars_base.h>
#include <inputsystem/iinputsystem.h>
#include "../sdk.h"
#include "../sdk/in_buttons.h"
#include "Aimbot.h"
@ -74,6 +65,7 @@ Aimbot::Aimbot() {
this->v_iFOV = CreateConVar("u_aimbot_fov", "0", "FOV aimbot (experimental)");
this->v_bMachinaPenetration = CreateConVar("u_aimbot_machina", "0", "Machina penetration aimbot (just for fun)");
this->v_bSmooth = CreateConVar("u_aimbot_smooth", "0", "Smooth aimbot");
this->v_flAutoShootHuntsmanCharge = CreateConVar("u_aimbot_huntsman_charge", "0.5", "Huntsman autoshoot charge");
this->v_fSmoothValue = CreateConVar("u_aimbot_smooth_value", "0.2", "Smooth value");
this->v_iAimKey = CreateConVar("u_aimbot_aimkey", "0", "Aim Key");
this->v_bAmbassador = CreateConVar("u_aimbot_ambassador", "0", "Ambassador mode."); // TODO
@ -385,7 +377,19 @@ bool Aimbot::Aim(IClientEntity* entity, CUserCmd* cmd) {
}
}
}
cmd->buttons |= IN_ATTACK;
if (g_pLocalPlayer->weapon && g_pLocalPlayer->weapon->GetClientClass()->m_ClassID == ClassID::CTFCompoundBow) {
float begincharge = GetEntityValue<float>(g_pLocalPlayer->weapon, eoffsets.flChargeBeginTime);
float charge = 0;
if (begincharge != 0) {
charge = interfaces::gvars->curtime - begincharge;
if (charge > 1.0f) charge = 1.0f;
}
if (charge >= v_flAutoShootHuntsmanCharge->GetFloat()) {
cmd->buttons &= ~IN_ATTACK;
}
} else {
cmd->buttons |= IN_ATTACK;
}
}
return true;
}

View File

@ -40,6 +40,7 @@ public:
ConVar* v_bSilent;
ConVar* v_bZoomedOnly;
ConVar* v_iAutoShootCharge;
ConVar* v_flAutoShootHuntsmanCharge;
ConVar* v_iMinRange;
ConVar* v_bRespectCloak;
ConVar* v_bCharge;

View File

@ -12,8 +12,7 @@
#include "../usercmd.h"
#include "../logging.h"
#include "../interfaces.h"
#include "../fixsdk.h"
#include <icvar.h>
#include "../sdk.h"
DEFINE_HACK_SINGLETON(Airstuck);

View File

@ -10,10 +10,7 @@
#include "../helpers.h"
#include "../entity.h"
#include "../interfaces.h"
#include "../fixsdk.h"
#include <icliententitylist.h>
#include <client_class.h>
#include <icliententity.h>
#include "../sdk.h"
DEFINE_HACK_SINGLETON(AntiDisguise);

View File

@ -17,11 +17,7 @@
#include "../drawing.h"
#include "../sdk/in_buttons.h"
#include "../fixsdk.h"
#include <client_class.h>
#include <icliententity.h>
#include <icliententitylist.h>
#include <convar.h>
#include "../sdk.h"
DEFINE_HACK_SINGLETON(AutoHeal);

View File

@ -15,11 +15,7 @@
#include "../sdk/in_buttons.h"
#include "../fixsdk.h"
#include <icliententitylist.h>
#include <icliententity.h>
#include <convar.h>
#include <client_class.h>
#include "../sdk.h"
DEFINE_HACK_SINGLETON(AutoReflect);

View File

@ -15,9 +15,7 @@
#include "../usercmd.h"
#include "../sdk/in_buttons.h"
#include "../logging.h"
#include "../fixsdk.h"
#include <icliententitylist.h>
#include <icliententity.h>
#include "../sdk.h"
DEFINE_HACK_SINGLETON(AutoSticky);

View File

@ -11,12 +11,8 @@
#include "../logging.h"
#include "../helpers.h"
#include "../fixsdk.h"
#include "../sdk.h"
#include "../sdk/in_buttons.h"
#include <cdll_int.h>
#include <icliententitylist.h>
#include <icliententity.h>
#include <tier1/convar.h>
#include "Bunnyhop.h"
DEFINE_HACK_SINGLETON(Bunnyhop);

View File

@ -7,7 +7,7 @@
#include "ESP.h"
#include "../fixsdk.h"
#include "../sdk.h"
#include "../drawing.h"
#include "../interfaces.h"
#include "../logging.h"
@ -17,13 +17,6 @@
#include "../entitycache.h"
#include "../targethelper.h"
#include "../localplayer.h"
#include <client_class.h>
#include <icliententitylist.h>
#include <cdll_int.h>
#include <icliententity.h>
#include <Color.h>
#include <tier1/convar.h>
#include <cmodel.h>
DEFINE_HACK_SINGLETON(ESP);

View File

@ -19,12 +19,7 @@
#include "../sdk/in_buttons.h"
#include "../followbot/ipcctl.h"
#include "../fixsdk.h"
#include <icliententity.h>
#include <icliententitylist.h>
#include <client_class.h>
#include <cdll_int.h>
#include <igameevents.h>
#include "../sdk.h"
DEFINE_HACK_SINGLETON(FollowBot);

View File

@ -0,0 +1,59 @@
/*
* HuntsmanCompensation.cpp
*
* Created on: Dec 4, 2016
* Author: nullifiedcat
*/
#include "HuntsmanCompensation.h"
#include "../helpers.h"
#include "../localplayer.h"
#include "../trace.h"
#include "../interfaces.h"
#include "../usercmd.h"
#include "../sdk.h"
DEFINE_HACK_SINGLETON(HuntsmanCompensation);
const char* HuntsmanCompensation::GetName() {
return "HUNTSMAN COMPENSATION";
}
HuntsmanCompensation::HuntsmanCompensation() {
this->v_bEnabled = CreateConVar("u_hc_enabled", "0", "Enable huntsman compensation");
}
bool HuntsmanCompensation::CreateMove(void*, float, CUserCmd* cmd) {
if (!v_bEnabled->GetBool()) return true;
if (!g_pLocalPlayer->weapon || (g_pLocalPlayer->weapon->GetClientClass()->m_ClassID != ClassID::CTFCompoundBow)) return true;
if (g_pLocalPlayer->life_state) return true;
static trace_t* view_trace = new trace_t();
Ray_t ray;
trace::g_pFilterDefault->SetSelf(g_pLocalPlayer->entity);
Vector forward;
float sp, sy, cp, cy;
sy = sinf(DEG2RAD(cmd->viewangles[1])); // yaw
cy = cosf(DEG2RAD(cmd->viewangles[1]));
sp = sinf(DEG2RAD(cmd->viewangles[0])); // pitch
cp = cosf(DEG2RAD(cmd->viewangles[0]));
forward.x = cp * cy;
forward.y = cp * sy;
forward.z = -sp;
forward = forward * 8192.0f + g_pLocalPlayer->v_Eye;
ray.Init(g_pLocalPlayer->v_Eye, forward);
interfaces::trace->TraceRay(ray, 0x4200400B, trace::g_pFilterDefault, view_trace);
float speed, grav;
bool arc;
GetProjectileData(g_pLocalPlayer->weapon, speed, arc, grav);
float ttf = view_trace->startpos.DistTo(view_trace->endpos) / speed;
Vector resv = view_trace->endpos;
resv.z += ttf * ttf * (grav * 400);
AimAt(g_pLocalPlayer->v_Eye, resv, cmd);
g_pLocalPlayer->bUseSilentAngles = true;
return true;
}
void HuntsmanCompensation::PaintTraverse(void*, unsigned int, bool, bool) {}

View File

@ -0,0 +1,22 @@
/*
* HuntsmanCompensation.h
*
* Created on: Dec 4, 2016
* Author: nullifiedcat
*/
#ifndef HACKS_HUNTSMANCOMPENSATION_H_
#define HACKS_HUNTSMANCOMPENSATION_H_
#include "IHack.h"
class HuntsmanCompensation : public IHack {
public:
DECLARE_HACK_METHODS();
HuntsmanCompensation();
ConVar* v_bEnabled;
};
DECLARE_HACK_SINGLETON(HuntsmanCompensation);
#endif /* HACKS_HUNTSMANCOMPENSATION_H_ */

View File

@ -7,6 +7,8 @@
#include "Misc.h"
#include <unistd.h>
#include "../hack.h"
#include "../helpers.h"
#include "../drawing.h"
@ -18,18 +20,7 @@
#include "../netmessage.h"
#include "../sdk/in_buttons.h"
#include "../fixsdk.h"
#include <icliententity.h>
#include <client_class.h>
#include <icliententitylist.h>
#include <Color.h>
#include <iclient.h>
#include <inetchannel.h>
#include <cdll_int.h>
#include <iconvar.h>
#include <dt_common.h>
#include <inputsystem/iinputsystem.h>
#include <globalvars_base.h>
#include "../sdk.h"
DEFINE_HACK_SINGLETON(Misc);
@ -221,6 +212,7 @@ Misc::Misc() {
c_Reset = CreateConCommand("u_reset_lists", CC_ResetLists, "Remove all friends and rage");
c_Disconnect = CreateConCommand("u_disconnect", CC_Disconnect, "Disconnect");
c_DisconnectVAC = CreateConCommand("u_disconnect_vac", CC_DisonnectVAC, "Disconnect (VAC)");
v_bInfoSpam = CreateConVar("u_info_spam", "0", "Info spam");
}
int sa_switch = 0;
@ -235,6 +227,28 @@ bool Misc::CreateMove(void*, float, CUserCmd* cmd) {
logging::Info("Sending!");
ch->SendNetMsg(*(INetMessage*)&setname);
}*/
static int curindex = 0;
static int lastsay = 0;
if (lastsay && lastsay < 200) {
lastsay++;
} else lastsay = 0;
if (v_bInfoSpam->GetBool() && (lastsay == 0)) {
IClientEntity* ent = interfaces::entityList->GetClientEntity(curindex++);
if (curindex >= 64) curindex = 0;
//logging::Info("Making string for %i", curindex);
if (!ent || ent->IsDormant()) goto breakif;
//logging::Info("a");
if (ent->GetClientClass()->m_ClassID != ClassID::CTFPlayer) goto breakif;
//logging::Info("a");
if (GetEntityValue<int>(ent, eoffsets.iTeamNum) == g_pLocalPlayer->team) goto breakif;
//logging::Info("Making string for %i", curindex);
const char* str = MakeInfoString(ent);
if (str) {
interfaces::engineClient->ServerCmd(strfmt("say %s", str));
lastsay = 1;
}
}
breakif:
return true;
}

View File

@ -20,6 +20,7 @@ public:
//ConVar* v_bNoShootUntilCanHeadshot;
ConVar* v_bDbWeaponInfo;
ConVar* v_strName;
ConVar* v_bInfoSpam;
ConCommand* c_DumpItemAttributes;
ConCommand* c_SayLine;
ConCommand* c_Shutdown;

21
uran/src/hacks/SpyAlert.h Normal file
View File

@ -0,0 +1,21 @@
/*
* SpyAlert.h
*
* Created on: Dec 5, 2016
* Author: nullifiedcat
*/
#ifndef HACKS_SPYALERT_H_
#define HACKS_SPYALERT_H_
#include "IHack.h"
class SpyAlert : public IHack {
public:
DECLARE_HACK_METHODS();
SpyAlert();
};
DECLARE_HACK_SINGLETON(SpyAlert);
#endif /* HACKS_SPYALERT_H_ */

View File

@ -15,17 +15,9 @@
#include "../trace.h"
#include "../localplayer.h"
#include "../fixsdk.h"
#include "../sdk.h"
#include "../sdk/in_buttons.h"
#include <icliententity.h>
#include <cdll_int.h>
#include <icliententitylist.h>
#include <engine/IEngineTrace.h>
#include <Color.h>
#include <gametrace.h>
#include <icliententity.h>
#include <client_class.h>
#include <tier1/convar.h>
#include "Trigger.h"
DEFINE_HACK_SINGLETON(Triggerbot);

View File

@ -15,19 +15,8 @@
#include "entitycache.h"
#include "playerresource.h"
#include "fixsdk.h"
#include <tier1/convar.h>
#include <engine/ivmodelinfo.h>
#include <icliententity.h>
#include <cmodel.h>
#include <studio.h>
#include <gametrace.h>
#include <icliententitylist.h>
#include <cdll_int.h>
#include <engine/IEngineTrace.h>
#include <client_class.h>
#include <inetchannelinfo.h>
#include <globalvars_base.h>
#include "sdk.h"
bool IsPlayerInvulnerable(IClientEntity* player) {
int cond1 = GetEntityValue<int>(player, eoffsets.iCond);
@ -468,7 +457,14 @@ bool GetProjectileData(IClientEntity* weapon, float& speed, bool& arc, float& gr
charge = interfaces::gvars->curtime - begincharge;
if (charge > 1.0f) charge = 1.0f;
}
rgrav = 0.5 - 0.4 * charge;
//rgrav = ( ( ( 1.3 - charge ) / 3 ) * 1000 ) / 800; // F1Public's method
/*if (charge <= 0.5f) {
rgrav = 0.5 - 0.4 * charge;
} else {
rgrav = 0.4 - 0.3 * charge;
}*/
rgrav = 0.5 - 0.4 * (charge);
rspeed = 1800 + 800 * charge;
rarc = true;
} break;
@ -496,6 +492,26 @@ bool GetProjectileData(IClientEntity* weapon, float& speed, bool& arc, float& gr
return true;
}
const char* MakeInfoString(IClientEntity* player) {
char* buf = new char[256]();
player_info_t info;
if (!interfaces::engineClient->GetPlayerInfo(player->entindex(), &info)) return (const char*)0;
logging::Info("a");
int hWeapon = GetEntityValue<int>(player, eoffsets.hActiveWeapon);
if (GetEntityValue<char>(player, eoffsets.iLifeState)) {
sprintf(buf, "%s is dead %s", info.name, tfclasses[GetEntityValue<int>(player, eoffsets.iClass)]);
return buf;
}
if (hWeapon) {
IClientEntity* weapon = interfaces::entityList->GetClientEntity(hWeapon & 0xFFF);
sprintf(buf, "%s is %s with %i health using %s", info.name, tfclasses[GetEntityValue<int>(player, eoffsets.iClass)], GetEntityValue<int>(player, eoffsets.iHealth), weapon->GetClientClass()->GetName());
} else {
sprintf(buf, "%s is %s with %i health", info.name, tfclasses[GetEntityValue<int>(player, eoffsets.iClass)], GetEntityValue<int>(player, eoffsets.iHealth));
}
logging::Info("Result: %s", buf);
return buf;
}
trace::FilterNoPlayer* vec_filter;
bool IsVectorVisible(Vector origin, Vector target) {
//logging::Info("ISVV");

View File

@ -55,6 +55,7 @@ float DistToSqr(IClientEntity* entity);
void fClampAngle(Vector& qaAng);
void fVectorAngles(Vector &forward, Vector &angles);
float deg2rad(float deg);
const char* MakeInfoString(IClientEntity* player);
bool GetProjectileData(IClientEntity* weapon, float& speed, bool& arc, float& gravity);
bool IsVectorVisible(Vector a, Vector b);
bool PredictProjectileAim(Vector origin, IClientEntity* target, hitbox hb, float speed, bool arc, float gravity, Vector& result);

View File

@ -9,11 +9,7 @@
#include "interfaces.h"
#include "entity.h"
#include "fixsdk.h"
#include <cdll_int.h>
#include <icliententitylist.h>
#include <mathlib/vector.h>
#include <icliententity.h>
#include "sdk.h"
void LocalPlayer::Update() {
entity_idx = interfaces::engineClient->GetLocalPlayer();

View File

@ -13,8 +13,7 @@
#include <pwd.h>
#include "interfaces.h"
#include "fixsdk.h"
#include <icvar.h>
#include "sdk.h"
FILE* logging::handle = 0;

View File

@ -10,10 +10,7 @@
#include "enums.h"
#include "entity.h"
#include "fixsdk.h"
#include <icliententity.h>
#include <icliententitylist.h>
#include <client_class.h>
#include "sdk.h"
void TFPlayerResource::Update() {
m_pEntity = 0;

37
uran/src/sdk.h Normal file
View File

@ -0,0 +1,37 @@
/*
* sdk.h
*
* Created on: Dec 5, 2016
* Author: nullifiedcat
*/
#ifndef SDK_H_
#define SDK_H_
#include "fixsdk.h"
#include <client_class.h>
#include <icliententity.h>
#include <icliententitylist.h>
#include <cdll_int.h>
#include <inetchannelinfo.h>
#include <gametrace.h>
#include <engine/IEngineTrace.h>
#include <globalvars_base.h>
#include <engine/ivmodelinfo.h>
#include <inputsystem/iinputsystem.h>
#include <mathlib/vector.h>
#include <icvar.h>
#include <Color.h>
#include <cmodel.h>
#include <igameevents.h>
#include <iclient.h>
#include <inetchannel.h>
#include <iconvar.h>
#include <studio.h>
#include <vgui/ISurface.h>
#include <vgui/IPanel.h>
#include <mathlib/vmatrix.h>
#include <view_shared.h>
#endif /* SDK_H_ */

View File

@ -10,9 +10,7 @@
#include "localplayer.h"
#include "helpers.h"
#include "fixsdk.h"
#include <icliententity.h>
#include <client_class.h>
#include "sdk.h"
/*
* Targeting priorities:

View File

@ -10,9 +10,7 @@
#include <cstdint>
#include "fixsdk.h"
#include <client_class.h>
#include <icliententity.h>
#include "sdk.h"
// This file is a mess. I need to fix it. TODO