Raised This Month: $ Target: $400
 0% 

[ANY] Little Anti-Cheat


Post New Thread Reply   
 
Thread Tools Display Modes
Author
whiteskypony
Member
Join Date: Jun 2015
Location: vsh_crevice_b5
Plugin ID:
6943
Plugin Version:
1.7.1
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    A simplistic Anti-Cheat for source games
    Old 08-03-2020 , 19:39   Re: [ANY] Little Anti-Cheat
    Reply With Quote #1

    Where does the anti cheat look for invalid convars? Im having problems in one of our servers the AC always bans me for invalid convar (sv_cheats 1),
    we have it installed on 3 servers and only one of them does this. The only temp solution was to disable the convar ban check.

    Im root admin on those.

    I was not sure if i have an .cfg file on my end that may cause this but nothing.

    *PD: This happen with version 1.5.1 and now with 1.6.1
    __________________
    Steam | Vidya Servers | Discord: Maximo#5396 / kitsumy.



    Last edited by whiteskypony; 08-03-2020 at 19:42.
    whiteskypony is offline
    J_Tanzanite
    Senior Member
    Join Date: Aug 2018
    Location: Norway
    Old 08-04-2020 , 03:30   Re: [ANY] Little Anti-Cheat
    Reply With Quote #2

    Quote:
    Originally Posted by whiteskypony View Post
    Where does the anti cheat look for invalid convars?
    Queries are sent here: https://github.com/J-Tanzanite/Littl.../lilac.sp#L971
    Queries are checked here: https://github.com/J-Tanzanite/Littl...lilac.sp#L1022

    Quote:
    Originally Posted by whiteskypony View Post
    Where does the anti cheat look for invalid convars? Im having problems in one of our servers the AC always bans me for invalid convar (sv_cheats 1),
    we have it installed on 3 servers and only one of them does this. The only temp solution was to disable the convar ban check.

    Im root admin on those.

    I was not sure if i have an .cfg file on my end that may cause this but nothing.

    *PD: This happen with version 1.5.1 and now with 1.6.1
    Quote:
    Originally Posted by Sreaper View Post
    I'm having the same issue as the above poster. Can you please add code to exclude admins from the checks? Thank you for the plugin.
    I'm not sure what the underlying issue is, but it kinda sounds like you two have a plugin or something that gives you sv_cheats 1 access since you are admins... Tho, it's hard to tell.
    If you disable Lilac ConVar checks "lilac_convar 0" and go on your servers, and type "sv_cheats" in your game console (Not server console!), if it says it's 1 but others (like non-admins/normal players) have it as 0 - then that would suggest it's you giving yourselves sv_cheats access, probably via another plugin.

    As for code to exclude admins from checks, no, there is however already a system in place which you could use to disable certain detections on specific players, and that's the forwards Lilac provides.
    Here is some psudocode:
    Code:
    #include <sourcemod>
    
    #define CHEAT_CONVAR 	2 // From the lilac.sp file, this value is set in stone and won't ever be changed.
    
    public Action lilac_allow_cheat_detection(int client, int cheat)
    {
    	// Only check ConVar detections.
    	if (cheat == CHEAT_CONVAR) {
    
    		// This function "is_client_admin()" doesn't exist!
    		// Not sure how you check for admins, been told you
    		// should use "CheckCommandAccess()"
    		if (is_client_admin(client)) {
    
    			// Client is an admin and the cheat detected
    			// was a ConVar violation.
    			// This tells Lilac to ignore the detection (and not ban).
    			return Plugin_Handled;
    		}
    	}
    
    	// Cheat detected wasn't a ConVar or the client wasn't an admin.
    	// Allow the cheat detection to happen.
    	return Plugin_Continue;
    }
    You can make your own plugins with this code or add this directly to Lilac, tho the former is cleaner.
    J_Tanzanite is offline
    whiteskypony
    Member
    Join Date: Jun 2015
    Location: vsh_crevice_b5
    Old 08-04-2020 , 09:48   Re: [ANY] Little Anti-Cheat
    Reply With Quote #3

    Quote:
    You can make your own plugins with this code or add this directly to Lilac, tho the former is cleaner.
    It was as you say early, when i typed sv_cheats it was to "1" on my end, im not sure what plugin does this.

    Anyways the code seems to work perfect THANKS alot, i include it in lilac main plugin:
    Code:
    public Action lilac_allow_cheat_detection(int client, int cheat)
    {
    	if (cheat == CHEAT_CONVAR) {
    
    		if (CheckCommandAccess(client, "CVAR_ENABLE", ADMFLAG_CHEATS)) {
    			return Plugin_Handled;
    		}
    	}
    	return Plugin_Continue;
    }
    __________________
    Steam | Vidya Servers | Discord: Maximo#5396 / kitsumy.



    Last edited by whiteskypony; 08-04-2020 at 09:49.
    whiteskypony is offline
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 21:20.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode