Skip to content

Commit

Permalink
added shitty detected modules
Browse files Browse the repository at this point in the history
added shitty detected modules
  • Loading branch information
Lefraudeur authored Feb 23, 2024
2 parents 150a6b4 + 248fba4 commit 2da33c6
Show file tree
Hide file tree
Showing 11 changed files with 183 additions and 10 deletions.
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
![image](https://github.com/Lefraudeur/RiptermsGhost/assets/73477238/0d8f6308-1036-4480-b487-eaf02d07259d)

# RiptermsGhost


#### Not maintained


An example injectable cheat for minecraft using java native interface, jvmti, java method hooking, and constant pool editing.

This branch is really different from the previous Ripterms you might know.
Expand Down Expand Up @@ -43,13 +37,17 @@ Change mappings to add new versions
- WTap
- Sprint
- HitBoxes
- NoFall
- Glide
- VelocityFly
- Speed

![image](https://github.com/Lefraudeur/RiptermsGhost/assets/91006387/39690baa-859a-4ea2-a9b0-dfbc8cbfe472)


Insert to open the gui / end key to self destruct

![image](https://github.com/Lefraudeur/RiptermsGhost/assets/91006387/8857b5f1-743e-4417-ab55-922252aaf0a0)
![image](https://github.com/Lefraudeur/RiptermsGhost/assets/73477238/0d8f6308-1036-4480-b487-eaf02d07259d)

### Event system (hook, modifiy parameters, cancel, modify return value):
- onAddToSendQueue (edit sent packets)
Expand Down
3 changes: 3 additions & 0 deletions Ripterms Ghost.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -226,15 +226,18 @@
<ClCompile Include="Ripterms\Modules\ClientBrandChanger.cpp" />
<ClCompile Include="Ripterms\Modules\FastPlace.cpp" />
<ClCompile Include="Ripterms\Modules\FullBright.cpp" />
<ClCompile Include="Ripterms\Modules\Glide.cpp" />
<ClCompile Include="Ripterms\Modules\HitBoxes.cpp" />
<ClCompile Include="Ripterms\Modules\LeftClicker.cpp" />
<ClCompile Include="Ripterms\Modules\LegitScaffold.cpp" />
<ClCompile Include="Ripterms\Modules\Modules.cpp" />
<ClCompile Include="Ripterms\Modules\NoFall.cpp" />
<ClCompile Include="Ripterms\Modules\Reach.cpp" />
<ClCompile Include="Ripterms\Modules\Speed.cpp" />
<ClCompile Include="Ripterms\Modules\Sprint.cpp" />
<ClCompile Include="Ripterms\Modules\Test.cpp" />
<ClCompile Include="Ripterms\Modules\Velocity.cpp" />
<ClCompile Include="Ripterms\Modules\VelocityFly.cpp" />
<ClCompile Include="Ripterms\Modules\WTap.cpp" />
<ClCompile Include="Ripterms\Modules\Xray.cpp" />
<ClCompile Include="Ripterms\Ripterms.cpp" />
Expand Down
9 changes: 9 additions & 0 deletions Ripterms Ghost.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,15 @@
<ClCompile Include="java\lang\Double\Double.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="Ripterms\Modules\Glide.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="Ripterms\Modules\VelocityFly.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="Ripterms\Modules\Speed.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Ripterms\Ripterms.h">
Expand Down
11 changes: 11 additions & 0 deletions Ripterms/GUI/GUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,17 @@ static LRESULT CALLBACK detour_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARA
return true;
}

if (msg == WM_KEYDOWN)
{
for (const std::pair<std::string, std::vector<Ripterms::Modules::IModule*>>& category : Ripterms::Modules::categories)
{
for (Ripterms::Modules::IModule* m : category.second)
{
m->onKeyBind(wParam);
}
}
}

return CallWindowProcA(original_WndProc, hWnd, msg, wParam, lParam);
}

Expand Down
15 changes: 14 additions & 1 deletion Ripterms/Maths/Maths.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

Ripterms::Maths::Vector2d Ripterms::Maths::getYawPitch(Vector3d playerPos, Vector3d facingPos)
{
constexpr double pi = 3.14159265;
Vector3d delta = facingPos - playerPos;

double hypxz = std::sqrt(delta.x * delta.x + delta.z * delta.z);
Expand All @@ -25,6 +24,15 @@ Ripterms::Maths::Vector2d Ripterms::Maths::getYawPitch(Vector3d playerPos, Vecto
return Vector2d(yawDeg, pitchDeg);
}

Ripterms::Maths::Vector3d Ripterms::Maths::getCameraVector(Vector2d cameraRot, double distance)
{
double yawRad = cameraRot.x * (pi / 180.0);
double pitchRad = cameraRot.y * (pi / 180.0);
const double hypxz = distance * std::cos(pitchRad);

return Vector3d(-std::sin(yawRad) * hypxz, -std::sin(pitchRad) * distance, std::cos(yawRad) * hypxz);
}

double Ripterms::Maths::cropAngle180(double angle)
{
while (angle <= -180.0) angle += 360.0;
Expand Down Expand Up @@ -120,6 +128,11 @@ Ripterms::Maths::Vector2d Ripterms::Maths::Vector2d::operator*(double coef)
return Vector2d(x * coef, y * coef);
}

Ripterms::Maths::Vector2d Ripterms::Maths::Vector2d::crop180()
{
return Vector2d(cropAngle180(x), cropAngle180(y));
}

double Ripterms::Maths::Vector2d::distance()
{
return std::sqrt(x * x + y * y);
Expand Down
4 changes: 4 additions & 0 deletions Ripterms/Maths/Maths.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ namespace Ripterms
{
namespace Maths
{
inline constexpr double pi = 3.14159265;

class Vector3d
{
public:
Expand All @@ -26,10 +28,12 @@ namespace Ripterms
Vector2d operator-(const Vector2d& other_vector);
Vector2d operator+(const Vector2d& other_vector);
Vector2d operator*(double coef);
Vector2d crop180();
double distance();
};

Vector2d getYawPitch(Vector3d playerPos, Vector3d facingPos);
Vector3d getCameraVector(Vector2d cameraRot, double distance = 1.0);

double cropAngle180(double angle);
double cropAngle360(double angle);
Expand Down
19 changes: 19 additions & 0 deletions Ripterms/Modules/Glide.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#include "Modules.h"

void Ripterms::Modules::Glide::renderGUI()
{
static bool display_options = false;
ImGui::PushStyleVar(ImGuiStyleVar_ItemInnerSpacing, ImVec2(20.0f, 0.0f));
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(250.0f, ImGui::GetStyle().FramePadding.y));
ImGui::Checkbox("Glide", &enabled);
ImGui::PopStyleVar();
ImGui::PopStyleVar();
}

void Ripterms::Modules::Glide::onUpdateWalkingPlayer(JNIEnv* env, EntityPlayerSP& this_player, bool* cancel)
{
if (!enabled || this_player.getMotion().y > -0.1) return;
Ripterms::Maths::Vector3d motion = this_player.getMotion();
motion.y = (this_player.getTicksExisted() % 2 == 0 ? -0.1 : -0.16);
this_player.setMotion(motion);
}
8 changes: 7 additions & 1 deletion Ripterms/Modules/Modules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ void Ripterms::Modules::IModule::onGetClientModName(JNIEnv* env, bool* cancel)
{
}

void Ripterms::Modules::IModule::onKeyBind(int keyBind)
{
if (!keyBind || keyBind != this->keyBind) return;
enabled = !enabled;
}

static void addToSendQueue_callback(HotSpot::frame* frame, HotSpot::Thread* thread, bool* cancel)
{
if (!Ripterms::p_env) return;
Expand Down Expand Up @@ -182,4 +188,4 @@ void Ripterms::Modules::cleanAll()

void Ripterms::Modules::ESP::render()
{
}
}
33 changes: 32 additions & 1 deletion Ripterms/Modules/Modules.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,13 @@ namespace Ripterms
virtual void onGetMouseOver(JNIEnv* env, float partialTicks, bool* cancel);
virtual void onGetClientModName(JNIEnv* env, bool* cancel);

void onKeyBind(int keyBind);
protected:
inline static std::random_device rd{};
inline static std::mt19937 gen{rd()};
bool enabled = false;
int keyBind = 0;
bool waitingKey = false;
};


Expand Down Expand Up @@ -183,6 +186,7 @@ namespace Ripterms
class Xray : public IModule
{
public:
Xray() { this->keyBind = 0x58; };
void renderGUI() override;
void render() override;
void disable() override;
Expand Down Expand Up @@ -230,10 +234,37 @@ namespace Ripterms
void onAddToSendQueue(JNIEnv* env, NetHandlerPlayClient& sendQueue, Packet& packet, bool* cancel) override;
};

class Glide : public IModule
{
public:
Glide() { this->keyBind = 0x47; };
void renderGUI() override;
void onUpdateWalkingPlayer(JNIEnv* env, EntityPlayerSP& this_player, bool* cancel) override;
};

class VelocityFly : public IModule
{
public:
void renderGUI() override;
void onUpdateWalkingPlayer(JNIEnv* env, EntityPlayerSP& this_player, bool* cancel) override;
private:
float speed = 0.1f;
};

class Speed : public IModule
{
public:
void renderGUI() override;
void onUpdateWalkingPlayer(JNIEnv* env, EntityPlayerSP& this_player, bool* cancel) override;
private:
float speed = 0.1f;
};

inline std::map<std::string, std::vector<IModule*>> categories =
{
{"Combat", {new AimAssist(), new Reach(), new LeftClicker(), new WTap(), new HitBoxes()}},
{"Player", {new Velocity(), new FastPlace(), new Blink(), new LegitScaffold(), new Sprint(), new NoFall()}},
{"Player", {new FastPlace(), new Blink(), new LegitScaffold(), new NoFall()}},
{"Movement", {new Velocity(), new Sprint(), new Glide(), new VelocityFly(), new Speed()}},
{"Render", {new Xray(), new FullBright(), new ESP()}},
{"Whatever", {new ClientBrandChanger(), new Test()}}
};
Expand Down
34 changes: 34 additions & 0 deletions Ripterms/Modules/Speed.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#include "Modules.h"

void Ripterms::Modules::Speed::renderGUI()
{
static bool display_options = false;
ImGui::PushStyleVar(ImGuiStyleVar_ItemInnerSpacing, ImVec2(20.0f, 0.0f));
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(250.0f, ImGui::GetStyle().FramePadding.y));
ImGui::Checkbox("Speed", &enabled);
ImGui::PopStyleVar();
ImGui::PopStyleVar();
if (ImGui::IsItemClicked(ImGuiMouseButton_Right))
display_options = !display_options;
ImGui::SameLine();
ImGui::SetCursorPosX(ImGui::GetWindowWidth() - 30.0f);
if (ImGui::ArrowButton("SpeedOpt", ImGuiDir_Down))
display_options = !display_options;
if (display_options)
{
ImGui::SetCursorPosX(ImGui::GetCursorPosX() + 10.0f);
ImGui::BeginGroup();
ImGui::SliderFloat("Speed abpt", &speed, 0.01f, 2.0f, "%.2f");
ImGui::EndGroup();
}
}

void Ripterms::Modules::Speed::onUpdateWalkingPlayer(JNIEnv* env, EntityPlayerSP& this_player, bool* cancel)
{
if (!enabled || !(GetKeyState(0x5A) & 0x8000) || !this_player.isOnGround()) return;
Ripterms::Maths::Vector3d motion = this_player.getMotion();
Ripterms::Maths::Vector3d additional = Ripterms::Maths::getCameraVector(this_player.getRotation(), speed);
motion.x += additional.x;
motion.z += additional.z;
this_player.setMotion(motion);
}
45 changes: 45 additions & 0 deletions Ripterms/Modules/VelocityFly.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#include "Modules.h"

void Ripterms::Modules::VelocityFly::renderGUI()
{
static bool display_options = false;
ImGui::PushStyleVar(ImGuiStyleVar_ItemInnerSpacing, ImVec2(20.0f, 0.0f));
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(250.0f, ImGui::GetStyle().FramePadding.y));
ImGui::Checkbox("VelocityFly", &enabled);
ImGui::PopStyleVar();
ImGui::PopStyleVar();
if (ImGui::IsItemClicked(ImGuiMouseButton_Right))
display_options = !display_options;
ImGui::SameLine();
ImGui::SetCursorPosX(ImGui::GetWindowWidth() - 30.0f);
if (ImGui::ArrowButton("VelocityFlyOpt", ImGuiDir_Down))
display_options = !display_options;
if (display_options)
{
ImGui::SetCursorPosX(ImGui::GetCursorPosX() + 10.0f);
ImGui::BeginGroup();
ImGui::SliderFloat("Speed", &speed, 0.01f, 2.0f, "%.2f");
ImGui::EndGroup();
}
}

void Ripterms::Modules::VelocityFly::onUpdateWalkingPlayer(JNIEnv* env, EntityPlayerSP& this_player, bool* cancel)
{
if (!enabled) return;
Ripterms::Maths::Vector3d motion = this_player.getMotion();

if (GetKeyState(0x5A) & 0x8000)
{
Ripterms::Maths::Vector3d additional = Ripterms::Maths::getCameraVector(this_player.getRotation(), speed);
motion.x += additional.x;
motion.z += additional.z;
}
if (GetKeyState(VK_SPACE) & 0x8000)
motion.y = speed;
else if (GetKeyState(VK_LSHIFT) & 0x8000)
motion.y = -speed;
else motion.y = 0.0;

if (!this_player.isOnGround())
this_player.setMotion(motion);
}

0 comments on commit 2da33c6

Please sign in to comment.