Coder Social home page Coder Social logo

gmod-sdk's Introduction

GMod-SDK

This is a module for Garry's Mod that works based on a SDK.

I've spent the past few days reversing a few modules of the game, in order to get as many interfaces as I could that would be useful to make any type of internal module for Garry's Mod.

Note that this is still WIP!

This works in both x86, and x64.

I've uploaded every idb / dylib i've made while reversing the game, except x64 client.dll as it takes too much space for github.

The gui is an almost-perfect gamesense clone.

This also comes in with a built-in lua executor.

Usage

Compile as x86/x64 Release. Debug works too.

Get yourself an injector, select Garry's Mod, and inject the compiled .DLL into the target process.

If you did this right, the cheat should loaded.

Press INSERT to open the menu.

How to update

In case I stop working on this project, and you want to update it, feel free to fork this project.

Get the .dylibs using the game's macOs build SteamDepotDownloader, and make sure they're up-to-date when you compare them to the Windows build's interfaces.

Null functions can sometime be a pain, make sure they're not phasing out your entire interfaces. A single null function will stop everything from working.

Contact

You can contact me on Telegram, at t.me/@Gaztoof

This is my YouTube channel.

Made with

  • IDA Pro - The software I used to reverse the game.
  • VMT Dumper - The IDA script I used for dumping the VTables. I've found it on a forum and modified it.
  • IMGui - The GUI is just modified pure ImGui.

Contributing

  1. Fork the project (https://github.com/Gaztoof/GMod-SDK)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

gmod-sdk's People

Contributors

codabro avatar evaisadev avatar gaztoof avatar sanceilaks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gmod-sdk's Issues

access error

Exception thrown at 0x00007FFB66115AB8 (GMod-SDK.dll) in gmod.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFF8.

freezing issue

freezes game as soon as injected even know I am on 64x branch and multicore rendering disabled maybe the cheat hasn't updated yet to latest version of gmod.

[SOURCE] Auto Crouch-Jump

void CrouchJump(CUserCmd* cmd) { if (Settings::Misc::crouchJump && InputSystem->IsButtonDown(KEY_SPACE) && (!(localPlayer->getFlags() & FL_ONGROUND))) cmd->buttons |= IN_DUCK; }
Some Pasta For You :)

cant build

when i put the folder in visual studio it gives no option to build at the top or compile

Keyvalues

I see you have already tryed by evidence in tier1/Keyvalues.cpp

wtf is going with fps?

hiya gaztoof, when im joining a singlplayer game, i can not look around with my mouse, and the fps is around 20-30 when the normal amount is 120+ could u please help? cause is just impossible to play with it, maybe i will try to fix myself, but anyway

idea: doubletap

Is there any possibility to add doubletap?
Barely saw any cheats in gmod with dt and looking at other source engine games where its being used (csgo, tf2), its pretty op and looking at the fact that gmod has way more weapons (because of addons) the use for it could be better.
Some info that might help 1 & 2 And also, it seems to be better to detour cl_move idk why

Game crashes with it.

So, i've compiled the files in visual studio 2019, injected the DLL and the game crashed.
Version in console:

Protocol version 24
Exe version 2021.06.09 (garrysmod)
Exe build: 10:31:48 Jul  6 2021 (8277) (4000)
GMod version 2021.07.12, branch: x86-64, multicore: 1
Windows 32bit

I don't know what to do with this.

ScriptDetour Improvement

Unless I am misunderstanding this is really bad practice.

std::ifstream inFile;
inFile.open(detourDir.string());
if (inFile.good() && fileName != "runString.lua") {

	std::string content((std::istreambuf_iterator<char>(inFile)),
		(std::istreambuf_iterator<char>()));
	if (!strcmp(content.c_str(), fileContent.c_str()))return {};

	fileContent = content;
	return fileContent;
}
else {
	std::ofstream outDetourFile;
	outDetourFile.open(detourDir.string());
	if (outDetourFile.good())
	{
		outDetourFile << fileContent;
		outDetourFile.close();
	}
}

The problem is that you are saving every server file into the detour folder, in my original code this was not the intention.
The intention was for people to place the scripts themselves.
The reason for this is that when you have all the scripts pre placed in the detour folder you will no longer be getting any script updates from servers because there is already a script there.
A better solution for a runtime detour would be to instead have the detour scripts that users add append onto the original script. This way you can do stuff like rerouting functions without replacing the entire file.

OldEpicFunction = EpicFunction
EpicFunction = function()
    -- Do your own stuff
    OldEpicFunction()
    -- Do your own stuff
end

Something like this would probably work?

std::ifstream inFile;
inFile.open(detourDir.string());
if (inFile.good() && fileName != "runString.lua") {

	std::string content((std::istreambuf_iterator<char>(inFile)),
		(std::istreambuf_iterator<char>()));
	if (!strcmp(content.c_str(), fileContent.c_str()))return {};

	fileContent = fileContent + "\n\n" + content;
	return fileContent;
}

antialias (idea)

you can put
pLine->SetAntialias(TRUE);
to the render initialization and everything lines will become more beautiful

image

Screengrab issues?

so I've joined this Russian server called "Wayzer's RP" and first of all the cheat wasn't rendering on the client side, but the feature like bhop was working fine.

After several hours I got banned for cheats (I had the FOV circle and the thing at the top left corner) and it was seen on the screengrab pic the admin shown me! 

"How strange?" I've thought, the entire cheat's UI could not be opened too! I could not fix this by myself

Still freezes game

I inject the dll into my gmod 64x with xenos 64x and it still freezes my game and I am on gmod 64 beta I freezes with anooying hev sound spamming Still not working I had to ctrl and alt delete to restart my pc cause I can't exit out there is two betas the chromium that is 64 but outdated and author 64x that is not outdated I dont know what's going on I dont know if the dll is causing the issue cause I downloaded from unkown cheats.

compiling issues

when im in debug mode it works but in release mode its saying that "executorFont" doesnt exist. ive tried commenting out the ifdef _DEBUG and endif but it still doesnt work.

proj issue

so if i change something in Present.h my compiler goes crazy lol
and i didn't touched anything in dllmain
image

Compile?

I'm confused, what do we compile it in?

Random crash

1.20 Random crash for no reason so unusable and I don't understand it, thank you for your understanding

how do I hook cl_move?

#include "../globals.hpp"

typedef void(__thiscall* FN_cl_move)(float, bool);
FN_cl_move oCLMove;

void __fastcall hkCLMove(float accumulated_extra_samples,
#ifndef _WIN64
void*, // __fastcall does literally nothing in x64, so that's why we make it inactive
#endif
bool bFinalTick)
{

}

Here is what I go so far but it says:
image

Issues compiling

1>------ Rebuild All started: Project: GMod-SDK, Configuration: Debug x64 ------
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(473,5): warning MSB8003: The WindowsSDKDir property is not defined. Some build tools may not be found.
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(499,5): warning MSB8029: The Intermediate directory or Output directory cannot reside under the Temporary directory as it could lead to issues with incremental build.
1>dllmain.cpp
1>C:\Users\weezo\AppData\Local\Temp\Rar$DRa21476.25121\GMod-SDK-main\GMod-SDK\dllmain.cpp(1,10): fatal error C1083: Cannot open include file: 'Windows.h': No such file or directory
1>imgui.cpp
1>C:\Users\weezo\AppData\Local\Temp\Rar$DRa21476.25121\GMod-SDK-main\GMod-SDK\ImGui\imgui.h(42,10): fatal error C1083: Cannot open include file: 'float.h': No such file or directory
1>imgui_demo.cpp
1>C:\Users\weezo\AppData\Local\Temp\Rar$DRa21476.25121\GMod-SDK-main\GMod-SDK\ImGui\imgui.h(42,10): fatal error C1083: Cannot open include file: 'float.h': No such file or directory
1>imgui_draw.cpp
1>C:\Users\weezo\AppData\Local\Temp\Rar$DRa21476.25121\GMod-SDK-main\GMod-SDK\ImGui\imgui.h(42,10): fatal error C1083: Cannot open include file: 'float.h': No such file or directory
1>imgui_impl_dx9.cpp
1>C:\Users\weezo\AppData\Local\Temp\Rar$DRa21476.25121\GMod-SDK-main\GMod-SDK\ImGui\imgui.h(42,10): fatal error C1083: Cannot open include file: 'float.h': No such file or directory
1>imgui_impl_win32.cpp
1>C:\Users\weezo\AppData\Local\Temp\Rar$DRa21476.25121\GMod-SDK-main\GMod-SDK\ImGui\imgui.h(42,10): fatal error C1083: Cannot open include file: 'float.h': No such file or directory
1>imgui_widgets.cpp
1>C:\Users\weezo\AppData\Local\Temp\Rar$DRa21476.25121\GMod-SDK-main\GMod-SDK\ImGui\imgui.h(42,10): fatal error C1083: Cannot open include file: 'float.h': No such file or directory
1>Memory.cpp
1>C:\Users\weezo\AppData\Local\Temp\Rar$DRa21476.25121\GMod-SDK-main\GMod-SDK\Memory.h(3,10): fatal error C1083: Cannot open include file: 'Windows.h': No such file or directory
1>Memory.h
1>C:\Users\weezo\AppData\Local\Temp\Rar$DRa21476.25121\GMod-SDK-main\GMod-SDK\Memory.h(3,10): fatal error C1083: Cannot open include file: 'Windows.h': No such file or directory
1>KeyValues.cpp
1>vmatrix.h
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\xmmintrin.h(79,10): fatal error C1083: Cannot open include file: 'malloc.h': No such file or directory
1>VPanelWrapper.h
1>Generating Code...
1>Done building project "GMod-SDK.vcxproj" -- FAILED.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

add netvars

please add these next update I wanna get m_angeyeangles for A resolver

Feature Request

You should render visuals by using the steam overlay device or the discord overlay device, it would prevent admins from screen capturing you.

Add Anti-OBS

Please add Anti-OBS. It would be nice for DarkRP because you can't clip anything without esp.

suggestion

add a esp option to find entitys so it highlights the entity that you selected.

fakeangles work but your movement breaks

so the movement fix doesn't seem to work for untrusted angles:

my cmd->viewangles.x = -180 for fakeup but my W and S keys are reversed the BackupCMD() function doesn't seem to be working?????

aimbot issues

.357
broken with the aimbot /rarely hits shots

fas2
cw2
no nospread?

also in the configs u forgot a comma so one of them says legitconfig1

unresolved external symbol (Memory.cpp)

Severity Code Description Project File Line Suppression State
Error LNK2001 unresolved external symbol "void __cdecl RestoreVMTHook(void * * *,void *,int)" (?RestoreVMTHook@@YAXPEAPEAPEAXPEAXH@Z dllmain.obj 1

Severity Code Description Project File Line Suppression State
Error LNK2001 unresolved external symbol "char * __cdecl GetRealFromRelative(char *,int,int,bool)" (?GetRealFromRelative@@YAPEADPEADHH_N@Z) GMod-SDK dllmain.obj 1

Severity Code Description Project File Line Suppression State
Error LNK2001 unresolved external symbol "char const * __cdecl findPattern(char const *,class std::basic_string_view<char,struct std::char_traits >,class std::basic_string<char,struct std::char_traits,class std::allocator >)" (?findPattern@@YAPEBDPEBDV?$basic_string_view@DU?$char_traits@D@std@@@std@@v?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@2@@z) GMod-SDK dllmain.obj 1

.

.

Freezes game as soon as injected

so I inject it and it quickly freezes my game and there is an white cursor and and author mouse I can move please fix this I install Microsoft visual studio 2019 c++ and game dev c++ and everything and I try injecting with author injector but when ever injecting xenos says failed to find pattern "cl_move" please contact us asap

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.