PDA

View Full Version : DoD Antihax


h0_noMan
05-09-2010, 10:39 PM
http://img29.imageshack.us/img29/1633/logotka.png

DoD Antihax v1.11 by h0_noMan (Last Update : 14 May 2010)

Features :
- Check Player's Config for Bad CVARs
- Prevent Players to use modified models or WAD
- AutoUpdate Data Files (CVARs, General Models and Map Dependencies)
- Warn admins when a new version of the plugin is available
- Multilingual (French + English)

Changelog :

Version 1.01 :
- Fixed an issue with query_client_cvar() returning a value of "Bad cvar request"

Version 1.02 :
- Plugin will now ban player after 3 warnings (Kick was only in Beta)
- Plugin will now display the correct default value for a CVAR when a detection is displayed
- Plugin will now load CVARs even if the "antihax_cvars" is 0 (but not detect, it will detect only if the cvar is 1)

Version 1.03 :
- Use of PCVARs

Version 1.10 :
- Improving sending parameters with set_task()
- Fixing a "index out of bound" with the number of players
- Delay for displaying Informations to admins increased by 5 seconds

Version 1.11 :
- Improving the construction of the log filename
- Fixed a "index out of bounds" with the number of CVARs

CVARs :
antihax_banlength (Default: 1440)
- When a player is detected with Bad CVARs 3 times he will be banned for this time (in seconds)

antihax_cvars | 0 = off | 1 = on (Default: 1)
- Disable or Enable the scanning Player's Config function

Required Modules :
- <sockets>

Installation :
- Compile the .sma file | An online compiler can be found here:
http:www.amxmodx.org/webcompiler.cgi
- Copy the compiled .amxx file into your addons\amxmodx\plugins folder
- Add the name of the compiled .amxx to the bottom of your addons\amxmodx\configs\plugins.ini
- Copy the .txt file to your addons\amxmodx\data\lang folder
- Copy all .dat file to your addons\amxmodx\configs\dod_antihax folder
- Change the map or restart your server to start using the plugin!

Problems :
If you have some problems with files that differs from the server, you can download a Restore Pack that will restore the original files :
- Restore Pack for Players (42 Mb) (http://dod.antihax.free.fr/Restore_Pack/Pack_Restore_Joueur.rar)
- Restore Pack for Servers (116 Mb) (http://dod.antihax.free.fr/Restore_Pack/Pack_Restore_Serveur.rar)

Website : http://dod.antihax.free.fr

Enjoy !

Dr.G
05-10-2010, 07:19 PM
I think you should post this at alliedmodders to get some good feedback. I dont have time nor the knowledge to check that socket stuff.


This:

new param[2]
param[0] = id
set_task(20.0 , "display_errorMessage", 0, param,1)

can and should be :

set_task(20.0 , "display_errorMessage", id)


Do not use set_task in a loop, the loop will happen so fast that the delay only will happen for the first player, here Iam think of the manage_ticket() function.. Overall that function looks weird...

Several times you run thru loops 32 (MAX_PLAYERS) times without knowing if they are on the server, watch out for Index is out of bounds errors.
Did you test this on a server with bots? It doesnt look like that, ignore then by using is_user_bot(id).


again -> I think you should post this at alliedmodders to get some good feedback..


- Cheers!

h0_noMan
05-10-2010, 09:38 PM
I think you should post this at alliedmodders to get some good feedback. I dont have time nor the knowledge to check that socket stuff.

I will do it.


set_task(20.0 , "display_errorMessage", id)


The 3rd parameter of the function is the ID of the task, i dont want to use it to send parameters.

Do not use set_task in a loop, the loop will happen so fast that the delay only will happen for the first player

The main loop task have a 5 seconds minimum delay.
I cant launch more than 1 extra loop from that main loop. I call a return after launching my task (line 360) so that i dont make a task for each player during one loop of the main task. I check one player during each loop of the main task.

here Iam think of the manage_ticket() function.. Overall that function looks weird...

This function is a loop task, during each loop it will scan one player.
It takes me a lot of times to find a method that wont check more than 2 players at the same time.
So i launch a loop task, that will control one player during each loop.

Several times you run thru loops 32 (MAX_PLAYERS) times without knowing if they are on the server, watch out for Index is out of bounds errors.

I think you did not understant how manage_ticket() works, this function is pretty tricky.

Did you test this on a server with bots? It doesnt look like that, ignore then by using is_user_bot(id).

Bots are not scanned, the plugin do not give them a scanning ticket.

h0_noMan
05-13-2010, 03:23 PM
New version.

Version 1.10 :
- Improving sending parameters with set_task()
- Fixing a "index out of bound" with the number of players
- Delay for displaying Informations to admins increased by 5 seconds

Alien
05-20-2010, 06:29 AM
Nice work h0_noMan

Thanks,

Alien

bozdw
06-18-2010, 04:20 PM
will it work on the maps that are not in the dat folder like dod_purple or dod_orange?
thanks boz

h0_noMan
06-20-2010, 12:18 AM
For the maps that are not present in the dat folder, the plugin will check the client's CVAR but wont check the models.

bozdw
06-20-2010, 10:41 AM
hi i will give it a try
for the Copy all .dat file to your addons\amxmodx\configs\dod_antihax folder

does that mean just put the full folder in addons\amxmodx\configs\ or
do i need to put all the files in individual
thanks boz

bozdw
06-21-2010, 08:29 AM
wow
one night of the plugin used this is just some of them

Bad File models/player/us-inf/us-inf.mdl
Bad CVAR rate=3500 (25000)
Bad CVAR rate=9999 (25000)
Bad CVAR rate=9999 (25000)
Bad File sprites/scope_spring.spr
Bad CVAR rate=10000 (25000)
models/player/us-para/us-para.mdl
models/p_fg42sr.mdl
"Player" Bad CVAR rate=2000 (25000) thats unbelievable to put it so low to have a lagging effect and so hard to hit

bozdw
06-21-2010, 04:09 PM
ok getting a little worried
where is the ban list?

models/player/us-para/us-para.mdl
models/p_fg42sr.mdl are these worthy of a ban because im not sure that these models could be different from server to server ?

h0_noMan
06-22-2010, 11:57 PM
There are 3 kind of configuration files :
- data_cvars.dat (Contain all CVARs that are scanned)
- data_models.dat (Contain all Player/Weapons models that must be the same on the server and on the client)
- <mapname>.dat (Contain MDL/WAD that are related to the map and must be the same on the server and on the client)

If a dat file is modified, deleted or corrupted the plugin will delete it and download a fresh copy.