Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Release] Simple Code AntiHack just testing

Elite Diviner
Joined
Nov 28, 2014
Messages
437
Reaction score
252
SEARCH FOR: WarZ.sln
Code:
m_ReticleTargetScale = R3D_MIN(1.0f + spread, 12.0f);

    // update reload anim
    if(wpn->isReloading())
    {
        uberAnim_->StartReloadAnim();
    }
    else
    {
        uberAnim_->StopReloadAnim();
    }

Add Bellow
Code:
//DouglasPRO :: JUST TESTING !!  
   if(PlayerState == PLAYER_IDLE){
        if(plr_local_Velocity.Z >= 1.5){
            if(PlayerState == PLAYER_IDLE){
                r3dOutToLog("WARNING : ERROR 101-A");
                extern bool gKillFlag;
                if(!gUserProfile.ProfileData.isDevAccount){//AlphaMMO A.C AGAINST SPEED HACK
                gKillFlag  = true;
                }
            }
        }
    }
   if(PlayerState == PLAYER_MOVE_RUN){
        if(plr_local_Velocity.Z >= 3.5){
            if(PlayerState == PLAYER_MOVE_RUN){
                r3dOutToLog("WARNING : ERROR SPEED HACK FOUND-B");
                if(!gUserProfile.ProfileData.isDevAccount){//AlphaMMO A.C AGAINST SPEED HACK
                extern bool gKillFlag;
                gKillFlag  = true;
                }
            }
        }
    }


   //ANTI JUMP
      if(JumpVelocity){
        if(JumpVelocity/*.Z*/ >= 22){
            if(PlayerState == PLAYER_MOVE_RUN){
                r3dOutToLog("WARNING : ERROR JUMP HACK FOUND -A");
                if(!gUserProfile.ProfileData.isDevAccount){//AlphaMMO A.C AGAINST JUMP HACK DouglasPRO
                extern bool gKillFlag;
                gKillFlag  = true;
                }
            }
        }
    }
    //DouglasPRO :: JUST TESTING !! 
    //ANTI DEBUG
    if(IsDebuggerPresent()){
            r3dOutToLog("WARNING : DEBUG FOUND -C");
            extern bool gKillFlag;
            if(!gUserProfile.ProfileData.isDevAccount){//AlphaMMO A.C DEBUG CANCEL
            gKillFlag  = true;
            }
    }
    
    if(bOnGround){
        if(plr_local_Velocity.Z >= 4.5){
            r3dOutToLog("WARNING : ERROR SPEED HACK FOUND-C");
            extern bool gKillFlag;
            if(!gUserProfile.ProfileData.isDevAccount){//AlphaMMO A.C AGAINST SPEED HACK
            gKillFlag  = true;
            }
        }
    }    


    VMPROTECT_End();
}
 

AcX

Newbie Spellweaver
Joined
Nov 11, 2015
Messages
24
Reaction score
7
Its way better to get a complete Antihack SDK, and a solid no name obfuscator like Mange-It, and what else. Just saying. But ofc. it will need a solid portion of coding skills.
 
Elite Diviner
Joined
Nov 28, 2014
Messages
437
Reaction score
252
Its way better to get a complete Antihack SDK, and a solid no name obfuscator like Mange-It, and what else. Just saying. But ofc. it will need a solid portion of coding skills.
I already have a project started !
 
Newbie Spellweaver
Joined
Jul 20, 2013
Messages
38
Reaction score
6
Hello friend, your code is valid, but it's not the best practice for the case to be on the client side. The best practice for this case is to make these checks on the server side, because it will not be possible to circumvent them.
 
Elite Diviner
Joined
Nov 28, 2014
Messages
437
Reaction score
252
Hello friend, your code is valid, but it's not the best practice for the case to be on the client side. The best practice for this case is to make these checks on the server side, because it will not be possible to circumvent them.
Hey bro, English very bad !!I understood nothing

"But to answer some things I understand This code and just a test I'm doing I have something here but complex and much like an SDK using a web server like the ghp"
 
Newbie Spellweaver
Joined
Jul 20, 2013
Messages
38
Reaction score
6
Hey bro, English very bad !!I understood nothing

"But to answer some things I understand This code and just a test I'm doing I have something here but complex and much like an SDK using a web server like the ghp"


Sorry for the bad english, google translator ON.
So all right, my only tip is to do the same protections from the server side, it will be more efficient.
 
Skilled Illusionist
Joined
May 17, 2013
Messages
309
Reaction score
206
I improved your code just a bit with notepad++
I haven't tested it, it's just example for how you have to do some anti-cheat things.
Code:
if(JumpVelocity > 19 && gUserProfile.ProfileData.isDevAccount == 0)
{
    //r3dOutToLog("WARNING : ERROR JUMP HACK FOUND -A"); // Don't be so stupid, if you are making client side anti-cheat, you have to avoid string max as possible.
#ifdef ENABLED_KILL_FLAG
    extern bool gKillFlag;
    gKillFlag  = true;
#else
    // Send packet to the server
    // There you can ban/kick the player, it's more safe than just close the process.
    PKT_C2S_RandomPacket_s n;
    n.SuperJumped = true;
    p2pSendToHost(this, &n, sizeof(n));
#endif // ENABLED_KILL_FLAG
}
 
Elite Diviner
Joined
Nov 28, 2014
Messages
437
Reaction score
252
I improved your code just a bit with notepad++
I haven't tested it, it's just example for how you have to do some anti-cheat things.
Code:
if(JumpVelocity > 19 && gUserProfile.ProfileData.isDevAccount == 0)
{
    //r3dOutToLog("WARNING : ERROR JUMP HACK FOUND -A"); // Don't be so stupid, if you are making client side anti-cheat, you have to avoid string max as possible.
#ifdef ENABLED_KILL_FLAG
    extern bool gKillFlag;
    gKillFlag  = true;
#else
    // Send packet to the server
    // There you can ban/kick the player, it's more safe than just close the process.
    PKT_C2S_RandomPacket_s n;
    n.SuperJumped = true;
    p2pSendToHost(this, &n, sizeof(n));
#endif // ENABLED_KILL_FLAG
}
Thanks by the council ... @ItzFdr

- - - Updated - - -

NEW LOGIC TESTINGS !

search:
Code:
PKT_S2C_Flashlight,

add bellow
Code:
PKT_C2S_RandomPacket, // FDR and DSP code ac

search
Code:
struct PKT_S2C_Flashlight_s : public DefaultPacketMixin<PKT_S2C_Flashlight>{
    //BYTE        peerId;
DWORD        peerId;;
    bool        Status;
    char plrname[128];
};


add bellow
Code:
struct PKT_C2S_RandomPacket_s : public DefaultPacketMixin<PKT_C2S_RandomPacket> //DouglasPRO:: NewLogic AC community !{
   bool     gKillFlag;
   int        peerId;
};

SEARCH
Code:
JumpVelocity  = 18;

add bellow
Code:
if(JumpVelocity > 18 && gUserProfile.ProfileData.isDevAccount == 0)   {
    //r3dOutToLog("WARNING : ERROR JUMP HACK FOUND -A"); // Don't be so stupid, if you are making client side anti-cheat, you have to avoid string max as possible.
#ifdef ENABLED_KILL_FLAG
    extern bool gKillFlag;
    gKillFlag  = true;
#else
    // Send packet to the server
    // There you can ban/kick the player, it's more safe than just close the process.
    PKT_C2S_RandomPacket_s n;
    addChatMessage(0, "<SYSTEM>", "KILLED PLAYER %s BY AC", 0);
    n.SuperJumped = true;
    p2pSendToHost(this, &n, sizeof(n));
#endif // ENABLED_KILL_FLAG
}
 
Newbie Spellweaver
Joined
Apr 14, 2013
Messages
36
Reaction score
8
PKT_S2C_Flashlight find not found, Or because src me.

i have if PKT_S2C_Flashlight Replace it PKT_C2C_PlayerSwitchFlashlight_s ?
 
Skilled Illusionist
Joined
May 17, 2013
Messages
309
Reaction score
206
One more method, this will force game client crash (WarZ has stopped working) for exemple.
Code:
if(JumpVelocity > 18 && gUserProfile.ProfileData.isDevAccount == 0)
{
    *(unsigned long*)0 = 0; // Forces the game to crash
    return;
}
 
Junior Spellweaver
Joined
Sep 14, 2013
Messages
156
Reaction score
6
One more method, this will force game client crash (WarZ has stopped working) for exemple.
Code:
if(JumpVelocity > 18 && gUserProfile.ProfileData.isDevAccount == 0)
{
    *(unsigned long*)0 = 0; // Forces the game to crash
    return;
}

I am curious why setting an unsigned long to 0 would crash the application(game)?
Do you know exactly why?
 
Back
Top