Thread: Force Cvar C++

Page 1 of 3 123 LastLast
Results 1 to 15 of 41
  1. #1
    mmmaaalll1's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    12
    Reputation
    10
    Thanks
    1

    Force Cvar C++

    I am quite new to this shit, so bare with my noobish stupidity...

    So just to be clear, I am not 100% retarded, I have been coding a lua hack etc. (it is shit, but the point is that I can sorta half code) and I have worked with C++ a bit before. So I have heard that forcing a cvar (in this case sv_cheats) is bad, but as far as I can tell it is the easiest way to do it, so for my first hack I am just going to make it like this. Using cheat engine I was able to find the base address, but from then on I have no idea what to do really. So basically how do I force a cvar in gmod?

    Just some info...

    Yes, I have it all working with cheat engine, but I want to learn how to code, so the point of this isn't really trying to hack a game, it is just to learn how to. So please don't just post something like "just use a public bypasser, it will work fine" or "just use cheat engine, it works just fine".

    Also, just as some side questions...

    1. Why is forcing a cvar a bad way to do it?
    2. Would VAC detect a cvar force on gmod? (And if you were to do this in a different game that VAC isn't broken in e.g. CSS, would VAC detect a cvar force?)

  2. #2
    mmmaaalll1's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    12
    Reputation
    10
    Thanks
    1
    Quote Originally Posted by _Fami View Post
    Because you shouldn't use ConVars, that's why it's bad.
    Yeah, but why not?, I just don't understand what's sooo bad about them.

  3. #3
    niller303's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    Denmark
    Posts
    105
    Reputation
    10
    Thanks
    475
    It's easily detectable

    ChangeCVARValue( "sv_allowcslua", 1 )
    if GetConVarValue( "sv_allowcslua" ) == 1 then BAN() end

    CreateClientConVar( "mahhake_aimboat", somthingsomthingsomthing )
    if ConVarExists( "mahhake_aimboat" ) then BAN() end

    local CCCV = CreateClientConVar
    CreateClientConVar = function( lol, ... )
    if ( !TBLWITHALLOWEDCVARS[ lol ] ) then
    BAN()
    end
    CCCV( lol, ... )
    end
    [IMG]https://www.danasof*****m/sig/Obama33868.jpg[/IMG]

  4. #4
    MeepDarknessMeep's Avatar
    Join Date
    Aug 2012
    Gender
    female
    Posts
    725
    Reputation
    22
    Thanks
    922
    ConVars are bad because they can be easily detected.
    You shouldn't use static offsets if you are doing internal shit.
    If you do use static offsets, you need to find the base for the module the place you want to get is in (client.dll in this case) and subtract the base from the place where you want to modify (ex. base is 0x10000000, modify place is 0x30000000, you would do 0x20000000). After that add that number to GetModuleHandle("yourdll").
    VAC won't detect it in gmod, but if gac ever decides to wake up it will definitely detect it. Also, clientside anticheats can detect it too. I have (a long time ago) forced sv_cheats with ce in css and never got banned from that.

  5. #5
    mmmaaalll1's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    12
    Reputation
    10
    Thanks
    1
    Quote Originally Posted by niller303 View Post
    It's easily detectable

    ChangeCVARValue( "sv_allowcslua", 1 )
    if GetConVarValue( "sv_allowcslua" ) == 1 then BAN() end

    CreateClientConVar( "mahhake_aimboat", somthingsomthingsomthing )
    if ConVarExists( "mahhake_aimboat" ) then BAN() end

    local CCCV = CreateClientConVar
    CreateClientConVar = function( lol, ... )
    if ( !TBLWITHALLOWEDCVARS[ lol ] ) then
    BAN()
    end
    CCCV( lol, ... )
    end
    I meant VAC detectable, I know there are many server AntiCheats though. Like, does VAC do anything at all?, because from some people I hear it is better than nothing (but still does very little) and from others I hear that it only bans BaconBot.

  6. #6
    mmmaaalll1's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    12
    Reputation
    10
    Thanks
    1
    Quote Originally Posted by MeepDarknessMeep View Post
    ConVars are bad because they can be easily detected.
    You shouldn't use static offsets if you are doing internal shit.
    If you do use static offsets, you need to find the base for the module the place you want to get is in (client.dll in this case) and subtract the base from the place where you want to modify (ex. base is 0x10000000, modify place is 0x30000000, you would do 0x20000000). After that add that number to GetModuleHandle("yourdll").
    VAC won't detect it in gmod, but if gac ever decides to wake up it will definitely detect it. Also, clientside anticheats can detect it too. I have (a long time ago) forced sv_cheats with ce in css and never got banned from that.
    Kk, thanks. As I already said I am a super noob at C++ hacking so bare with me :P...

    The address that I found is engine.dll+640A98, so that is the base correct? I don't really understand what you means when you say "modify place".

    Before I try to learn all this shit and fail, could you tell me if there is any easier place to start C++ hacking?, because from what I have seen so far, this bypass seems like it is going to be much harder than I originally thought.

  7. #7
    MeepDarknessMeep's Avatar
    Join Date
    Aug 2012
    Gender
    female
    Posts
    725
    Reputation
    22
    Thanks
    922
    Quote Originally Posted by mmmaaalll1 View Post
    Kk, thanks. As I already said I am a super noob at C++ hacking so bare with me :P...

    The address that I found is engine.dll+640A98, so that is the base correct? I don't really understand what you means when you say "modify place".

    Before I try to learn all this shit and fail, could you tell me if there is any easier place to start C++ hacking?, because from what I have seen so far, this bypass seems like it is going to be much harder than I originally thought.
    the offset in this case is 0x640A98 (engine.dll+640A98) and the base is engine.dll.
    (dword)GetModuleHandle("engine.dll") + 0x640A98 would be the address you want to modify.
    you have to dereference it to set the value. ex *(int*)((dword)GetModuleHandle("engine.dll") + 0x640A98) = 1

  8. #8
    Im-Friendly's Avatar
    Join Date
    Jul 2014
    Gender
    male
    Posts
    25
    Reputation
    10
    Thanks
    4
    If _fami was here he would have said:
    rofl FUCK 4 teh still bad get out of throses forums you don't know lua you mongtard shitty ac noob little autistic kid get dunked TOO GOOD he's autist little autistic kid smoke remplace

  9. #9
    MeepDarknessMeep's Avatar
    Join Date
    Aug 2012
    Gender
    female
    Posts
    725
    Reputation
    22
    Thanks
    922
    Quote Originally Posted by Im-Friendly View Post
    If _fami was here he would have said:
    rofl FUCK 4 teh still bad get out of throses forums you don't know lua you mongtard shitty ac noob little autistic kid get dunked TOO GOOD he's autist little autistic kid smoke remplace
    no one cares

  10. The Following User Says Thank You to MeepDarknessMeep For This Useful Post:

    Melted Bu11et (08-16-2014)

  11. #10
    mmmaaalll1's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    12
    Reputation
    10
    Thanks
    1
    Quote Originally Posted by MeepDarknessMeep View Post
    the offset in this case is 0x640A98 (engine.dll+640A98) and the base is engine.dll.
    (dword)GetModuleHandle("engine.dll") + 0x640A98 would be the address you want to modify.
    you have to dereference it to set the value. ex *(int*)((dword)GetModuleHandle("engine.dll") + 0x640A98) = 1
    Is this right?... I am not 100% sure if I understand it, but I did google all of it etc., so I think I know what I am talking about :P

    int& Address = *(int*) ((DWORD) GetModuleHandle("client.dll") + 0x640A98);

  12. #11
    hilo peeps's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    82
    Reputation
    10
    Thanks
    48
    My Mood
    Amazed
    fucking skids, stolen from sethhack once again. retards just because deagler.net and unitedhosts.org leaked sethhack u guys r going fucking nuts.

  13. #12
    MeepDarknessMeep's Avatar
    Join Date
    Aug 2012
    Gender
    female
    Posts
    725
    Reputation
    22
    Thanks
    922
    Quote Originally Posted by _Fami View Post
    no that's not right, also C++ is outdated, use C# https://garry.tv/2014/04/18/9-reasons-why-i-love-c/
    Don't listen to him.
    Quote Originally Posted by mmmaaalll1 View Post
    Is this right?... I am not 100% sure if I understand it, but I did google all of it etc., so I think I know what I am talking about :P

    int& Address = *(int*) ((DWORD) GetModuleHandle("client.dll") + 0x640A98);
    Close, your module is wrong. Also I highly recommend you to use a pointer instead of using an ampersand.

  14. #13
    max1612's Avatar
    Join Date
    Feb 2013
    Gender
    male
    Location
    C:/Users
    Posts
    532
    Reputation
    18
    Thanks
    1,466
    Quote Originally Posted by _Fami View Post
    Why? C++ is clearly outdated, Garry Newman himself (the creator of Garry's Mod) said that C# was better than C++ so stop saying bullshit, Garry's a better coder than you.
    Another Time: https://garry.tv/2014/04/18/9-reasons-why-i-love-c/
    so you are spamming litterly everything to just point this out?
    Empty for now

  15. #14
    ExiledStyles's Avatar
    Join Date
    Jan 2014
    Gender
    male
    Posts
    104
    Reputation
    10
    Thanks
    66
    dont listen to these retards, the best idea is to use patricks cvar spoofing method
    its the only good thing in gmod you nerds can get your hands on anyway

  16. The Following User Says Thank You to ExiledStyles For This Useful Post:

    z346etn56jzd7egth (08-16-2014)

  17. #15
    JDawg147's Avatar
    Join Date
    Feb 2012
    Gender
    male
    Posts
    237
    Reputation
    10
    Thanks
    183
    More spoons may be given if you're really interested.
    Code:
    	ConVar *{Name to be referenced, no spaces.} = cvar->FindVar("{Name of the ConVar}");
    	{Reference Name, no spaces.}->m_nFlags = {Flag you want the ConVar to have};
    	{Reference Name, no spaces.}->SetValue({Desired value});
    Should be easy enough to understand as is though, if you got any questions (actual questions), I'll be glad to answer them.

Page 1 of 3 123 LastLast

Similar Threads

  1. Stop Fighting The Force!!!!
    By SATANICAT in forum Spammers Corner
    Replies: 4
    Last Post: 12-13-2006, 06:42 PM
  2. british forces land on a beach
    By ace76543 in forum General
    Replies: 1
    Last Post: 12-01-2006, 03:27 PM
  3. Word and Proxy lists for C-Force
    By Mexiforce in forum Hack Requests
    Replies: 2
    Last Post: 10-24-2006, 06:22 PM
  4. brute force cracking
    By ace76543 in forum Spammers Corner
    Replies: 2
    Last Post: 08-15-2006, 01:23 AM
  5. How To Brute Force
    By Flawless in forum Game Hacking Tutorials
    Replies: 0
    Last Post: 01-01-2006, 05:01 PM