AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved/Old Plugins (https://forums.alliedmods.net/forumdisplay.php?f=27)
-   -   Anti-Crash (autobuy) & fullupdate blocker with logging (https://forums.alliedmods.net/showthread.php?t=163883)

alonelive 08-04-2011 14:01

Anti-Crash (autobuy) & fullupdate blocker with logging
 
2 Attachment(s)
Features:

  • Management a fullupdate command (BAN after X times use), set the max times to use
  • Protecting your server against autobuy crash exploit (cl_autobuy f*ck 123..).
  • Steam support for bans (by STEAMID)
  • Logging argumets of commands (autobuy, etc.)
  • Chat & sound announce
This plugin has a detailed logs, located here:

Code:

/* LOG Files **********************************************************************************************
addons/amxmodx/logs/anti-crash/fullupdate.log          - log of cleitns, who used fullupdate commands;    *
addons/amxmodx/logs/anti-crash/fullupdate-BANNED.log  - who have a ban by this plugin;                  *
addons/amxmodx/logs/anti-crash/autobuy.log            - autobuy attempts.                                *
**********************************************************************************************************/

Total: 1 sma, 1 amxx, 1 txt (lang file) + logs


CVARS:


/*////////// Set the max allowed count client's fullupdate commands before he will be banned. */
/*//////// Укажите максимальное кол-во раз ввода команды fullupdate игроком перед баном. */
register_cvar("ac_fupdate_maxcount", "5")

/*////////// Autobuy message in chat: "Autobuy is no allowed" every time when client use an autobuy command. Set "0" to disable. */
/*//////// Анонс в чате для игрока, использующего автобай: "Автозакупка не разрешена на сервере". Установите "0", чтобы выключить. */
register_cvar("ac_autobuy_announce", "1")

/*////////// Autobuy message in chat: "Fullupdate is no allowed" every time when client use a fullupdate command. Set "0" to disable. */
/*//////// Анонс в чате для игрока, использующего fullupdate: "Fullupdate не разрешен на сервере". Установите "0", чтобы выключить. */
register_cvar("ac_fullupdate_announce", "1")

/*////////// Sound announce for autobuy & fullupdate commands. Set "0" to disable. */
/*//////// Звуковой анонс для команд autobuy & fullupdate. Установите "0", чтобы выключить. */
register_cvar("ac_sound_announce", "1")


RESTRICTED AUTOBUY COMMANDS:

"cl_setautobuy"
"cl_autobuy"
"cl_setrebuy"
"cl_rebuy"
"autobuy"


Examples FROM Logs:

Quote:

L 08/04/2011 - 21:51:15: "AloneLive [sound off]<2><STEAM_0:0:1534814267><CT><192.168.1.2:270 05>" used AUTOBUY command. (Arguments: "m4a1 ak47 famas galil p90 mp5 deagle primammo secammo defuser vesthelm vest flash hegren")
Quote:

L 08/04/2011 - 21:51:26: "AloneLive [sound off]<2><STEAM_0:0:1534814267><CT><192.168.1.2:270 05>" use a *fullupdate* command (1/5)
Quote:

L 08/04/2011 - 21:53:05: "AloneLive [sound off]<1><STEAM_0:0:1534814267><CT><192.168.1.2:270 05>" got permanent ban. Reason: Attempted server crash.
P.S> my first normal plugin... :)


http://img13.imageshost.ru/img/2011/...ade6dc2242.png

http://img13.imageshost.ru/img/2011/...ade2928140.png

yokomo 08-04-2011 14:11

Re: Anti-Crash (autobuy) & fullupdate blocker with logging
 
Valve already fix this exploit. But i believe many people still need this because they wont update to beta hlds. Thank for your hardwork.

nikhilgupta345 08-04-2011 14:44

Re: Anti-Crash (autobuy) & fullupdate blocker with logging
 
Quote:

Steam and NoSteam support for bans (by IP and STEAMID)
Remove non-steam support..

alonelive 08-04-2011 14:50

Re: Anti-Crash (autobuy) & fullupdate blocker with logging
 
Quote:

/*////////// Comment this line to disable NON-STEAM ban support (by ip-address). */
/*///////// Закомментируйте линию ниже, чтобы отключить поддержку NON-STEAM (бан по IP-адресу). */
#define ENABLE_NOSTEAM_SUPPORT
It's time to choose :)

nikhilgupta345 08-04-2011 15:04

Re: Anti-Crash (autobuy) & fullupdate blocker with logging
 
This site does not support non-steam because it is illegal.

Remove it from your code.

alonelive 08-04-2011 15:12

Re: Anti-Crash (autobuy) & fullupdate blocker with logging
 
WOW :)
you - moderator?

fysiks 08-04-2011 15:17

Re: Anti-Crash (autobuy) & fullupdate blocker with logging
 
Quote:

Originally Posted by alonelive (Post 1525751)
WOW :)
you - moderator?

No. Are you saying non-moderators have no morals?

Oh, and it's a poor method for detecting fullupdate abuse. Fullupdate is a needed command.

alonelive 08-04-2011 15:26

Re: Anti-Crash (autobuy) & fullupdate blocker with logging
 
Ns support removed..

bibu 08-04-2011 15:49

Re: Anti-Crash (autobuy) & fullupdate blocker with logging
 
PHP Code:

    new name[33]
    
get_user_name(idname32

->

PHP Code:

    new name[32]
    
get_user_name(idname31


Arkshine 08-04-2011 16:20

Re: Anti-Crash (autobuy) & fullupdate blocker with logging
 
No, 33 is correct. Max character for a name : 32. Add the EOS, and you have 33.

claudiuhks 08-04-2011 16:49

Re: Anti-Crash (autobuy) & fullupdate blocker with logging
 
This can't be approved, oh my god...
Why did you block the autobuy command? You have to take each player's argument (from the autobuy command) and check if it has many than 31 characters...

bibu 08-04-2011 17:03

Re: Anti-Crash (autobuy) & fullupdate blocker with logging
 
Quote:

Originally Posted by Arkshine (Post 1525791)
No, 33 is correct. Max character for a name : 32.

Quote:

From wiki:
(common max name length is 31)
And also, all plugins I seen are using 32.

Arkshine 08-04-2011 17:28

Re: Anti-Crash (autobuy) & fullupdate blocker with logging
 
Just because people use something doesn't mean you are not allowed to think by yourself. 33 or 32, that's not it will make a major difference anyway, who cares.

bibu 08-04-2011 18:17

Re: Anti-Crash (autobuy) & fullupdate blocker with logging
 
Quote:

Originally Posted by Arkshine (Post 1525832)
Just because people use something doesn't mean you are not allowed to think by yourself. 33 or 32, that's not it will make a major difference anyway, who cares.

The wiki says max length of a name is 31. Adding the EOS makes it 32. Why should 33 be used then, and how do you come to the 33?

Arkshine 08-04-2011 18:25

Re: Anti-Crash (autobuy) & fullupdate blocker with logging
 
Wiki says a lot of things and some are wrong/outdated. After all written by human. I've already answered anyway. Back to the topic, that's not really the place to discuss about such insignificant details.

bibu 08-05-2011 06:42

Re: Anti-Crash (autobuy) & fullupdate blocker with logging
 
Quote:

Originally Posted by Arkshine (Post 1525864)
to discuss about such insignificant details.

Still you're wrong. :)

Arkshine 08-05-2011 06:56

Re: Anti-Crash (autobuy) & fullupdate blocker with logging
 
It doesn't matter 33 or 32. If the max characters of a name is 32, array should be 33, if 31, it should be 32. For me, the name is 32 max, so 33 would be correct. In the case max would be 31 characters, it will change... nothing in the current plugin. Both are correct anyway and your advice would be useless in all case.
If you think I'm wrong (and it's possible), feel free to create a thread about this matter. Back to the topic.

claudiuhks 08-05-2011 14:44

Re: Anti-Crash (autobuy) & fullupdate blocker with logging
 
1 Attachment(s)
Oh bibu, just leave it!
The maximum length for a player name is 32 like the Arkshine said...
If you're still not believing, just download the hlsdk packet from wiki and open the \multiplayer\cl_dlls\hud.h file...

Code:

#define MAX_PLAYER_NAME_LENGTH                32

ConnorMcLeod 08-05-2011 14:48

Re: Anti-Crash (autobuy) & fullupdate blocker with logging
 
Also, there is already an anti fullupdate spam plugin, and for cs it is useless because a delay has already been added by valve.

fysiks 08-05-2011 14:58

Re: Anti-Crash (autobuy) & fullupdate blocker with logging
 
Quote:

Originally Posted by ConnorMcLeod (Post 1526442)
Also, there is already an anti fullupdate spam plugin, and for cs it is useless because a delay has already been added by valve.

For CS or for GoldSrc?

ConnorMcLeod 08-05-2011 15:00

Re: Anti-Crash (autobuy) & fullupdate blocker with logging
 
CS only i think.

Quote:

Counter-Strike 1.6 Update Released
Product Update - Valve 19 May 2009
Updates to Counter-Strike 1.6 have been released. The updates will be applied automatically when your Steam client is restarted. The specific changes include:

Counter-Strike 1.6
Rolled back recent silent walking exploit fixes as we investigate less impactful ways of preventing the bug
Adjusted bomb bounding box to prevent silent plant exploit
Fix to eliminate or significantly reduce "flashbugs"
Fixed status icons (buy zone, bomb zone, etc) disappearing when starting a recording, or issuing a fullupdate
Prevent creating aliases using the same name as existing cvars
Rate limit fullupdate and some other commands to prevent spamming
Fixed an issue with grenades where they could go into an area and bounce infinitely, causing the server to choke and or crash

fysiks 08-05-2011 15:31

Re: Anti-Crash (autobuy) & fullupdate blocker with logging
 
Oh ok, so it was in a client-side fix. I didn't find anything for DOD.

alonelive 08-06-2011 06:34

Re: Anti-Crash (autobuy) & fullupdate blocker with logging
 
PHP Code:

claudiuhksgime me a code
if i must edit my plugin


^SmileY 08-07-2011 15:56

Re: Anti-Crash (autobuy) & fullupdate blocker with logging
 
PHP Code:

#include <amxmodx> 

public plugin_init( ) 

    
register_plugin"Anti AutoBuy"AMXX_VERSION_STR"SmileY" 

    
register_clcmd"cl_setautobuy""cmd_check" 
    
register_clcmd"cl_setrebuy""cmd_check" 


public 
cmd_checkid 

    static 
arg[512], args
    args 
read_argc( ) 

    for( 
1args; ++
    { 
        
read_argviargcharsmaxarg ) ) 

        if( 
is_cmd_longargcharsmaxarg ) ) ) 
        {
            new 
SteamID[32]
            
get_user_authid(id,SteamID,31)
            
server_cmd("kick #%d ^"Banido permanentemente^"",get_user_userid(id))
            
server_cmd("amx_addban ^"%s^" 0 ^"Tentativa de derrubar o servidor.^"",SteamID)
            return 
PLUGIN_HANDLED 
        

    } 

    return 
PLUGIN_CONTINUE 


stock bool:is_cmd_longstring[], const len 

    static 
cmd[512

    while( 
strlen( string ) ) 
    { 
        
strtokstringcmdcharsmaxcmd ), stringlen ' '

        if( 
strlencmd ) > 31 ) return true 
    


    return 
false 



This is launched before your post in submissions.

mohsen9010 08-30-2011 15:25

Re: Anti-Crash (autobuy) & fullupdate blocker with logging
 
change [ru] to [en] & [en] to [ru] in your text
Code:


[ru]
FUWARN = [Anti-Crash] %s! A 'fullupdate' command is NOT ALLOWED on this server! (WARN: %i/%i)
FUBAN = [Anti-Crash] %s got a permanent ban. Reason: Attempted server crash.
ABNA = [Anti-Crash] Autobuy in not allowed!
ABNA2 = [Anti-Crash] Check your CONFIG (cstrike/config.cfg)!
[en]
FUWARN = [Anti-Crash] %s! Вы будуте забанены за команду fullupdate! (пред.: %i из %i)
FUBAN = [Anti-Crash] %s забанен навечно за попытки вывести сервер из строя.
ABNA = [Anti-Crash] Автозакупка оружия на сервере запрещена! 
ABNA2 = [Anti-Crash] Проверьте Ваш КОНФИГ (cstrike/config.cfg)!


xPaw 08-30-2011 15:38

Re: Anti-Crash (autobuy) & fullupdate blocker with logging
 
Quote:

Originally Posted by ^SmileY (Post 1527784)
PHP Code:

#include <amxmodx> 

public plugin_init( ) 

    
register_plugin"Anti AutoBuy"AMXX_VERSION_STR"SmileY" 

    
register_clcmd"cl_setautobuy""cmd_check" 
    
register_clcmd"cl_setrebuy""cmd_check" 


public 
cmd_checkid 

    static 
arg[512], args
    args 
read_argc( ) 

    for( 
1args; ++
    { 
        
read_argviargcharsmaxarg ) ) 

        if( 
is_cmd_longargcharsmaxarg ) ) ) 
        {
            new 
SteamID[32]
            
get_user_authid(id,SteamID,31)
            
server_cmd("kick #%d ^"Banido permanentemente^"",get_user_userid(id))
            
server_cmd("amx_addban ^"%s^" 0 ^"Tentativa de derrubar o servidor.^"",SteamID)
            return 
PLUGIN_HANDLED 
        

    } 

    return 
PLUGIN_CONTINUE 


stock bool:is_cmd_longstring[], const len 

    static 
cmd[512

    while( 
strlen( string ) ) 
    { 
        
strtokstringcmdcharsmaxcmd ), stringlen ' '

        if( 
strlencmd ) > 31 ) return true 
    


    return 
false 



This is launched before your post in submissions.

You are not author of this plugin, you just put your nickname in there.

alonelive 08-31-2011 11:12

Re: Anti-Crash (autobuy) & fullupdate blocker with logging
 
Quote:

You are not author of this plugin, you just put your nickname in there.
What are you talking about?

xPaw 08-31-2011 13:26

Re: Anti-Crash (autobuy) & fullupdate blocker with logging
 
Quote:

Originally Posted by alonelive (Post 1544863)
What are you talking about?

You don't see the post i quoted? :|

OvidiuS 08-31-2011 14:37

Re: Anti-Crash (autobuy) & fullupdate blocker with logging
 
i think this one is better :P
http://www.datenkrieger.eu/AutoBuyFix_v14.sma

Exolent[jNr] 08-31-2011 14:56

Re: Anti-Crash (autobuy) & fullupdate blocker with logging
 
Quote:

Originally Posted by OvidiuS (Post 1544998)
i think this one is better :P
http://www.datenkrieger.eu/AutoBuyFix_v14.sma

Actually, it's not, because the motd_* commands don't work in Steam CS anymore.
Also, it doesn't fix the fullupdate crash for games other than CS.

ConnorMcLeod 10-08-2011 12:24

Re: Anti-Crash (autobuy) & fullupdate blocker with logging
 
fullupdate is already handled by the game.

About autobuy and such, you don't even check the validity of params and you don't check the length of the string witch is the reason of crashes, would be better to check string length and to fix it.

Unapproved.

Rewrite the whole plugin with a real fix if you want to re-submit it.

xPaw 10-08-2011 18:18

Re: Anti-Crash (autobuy) & fullupdate blocker with logging
 
Quote:

Originally Posted by ConnorMcLeod (Post 1570765)
About autobuy and such, you don't even check the validity of params and you don't check the length of the string witch is the reason of crashes, would be better to check string length and to fix it

New engine update, which will come out for CS soon, has fixed autobuy problem.

ConnorMcLeod 10-08-2011 18:33

Re: Anti-Crash (autobuy) & fullupdate blocker with logging
 
Quote:

Originally Posted by xPaw (Post 1571043)
New engine update, which will come out for CS soon, has fixed autobuy problem.

I know, but soon is not now.

xPaw 10-09-2011 03:50

Re: Anti-Crash (autobuy) & fullupdate blocker with logging
 
Quote:

Originally Posted by ConnorMcLeod (Post 1571049)
I know, but soon is not now.

It already came out for other HL based games, so fairly soon.

cre8or 10-25-2011 15:56

Re: Anti-Crash (autobuy) & fullupdate blocker with logging
 
I get ML_NOTFOUND: ABNA and so on, when on english. Any solution ?

styler 10-28-2011 11:46

Re: Anti-Crash (autobuy) & fullupdate blocker with logging
 
Quote:

Originally Posted by cre8or (Post 1583154)
I get ML_NOTFOUND: ABNA and so on, when on english. Any solution ?

You have to put the anti-crash.txt into cstrike\addons\amxmodx\data\lang\

cre8or 10-28-2011 13:47

Re: Anti-Crash (autobuy) & fullupdate blocker with logging
 
Hehe yes its there , (i get to view russian or nothing) but now i changed plugin to "PomanoB / UFPS.Team" 1.4 so i dont use that anymore. But i want to have the client args in the logfile as used in this one, anybody know howto fix it?

SGT 10-30-2011 08:42

Re: Anti-Crash (autobuy) & fullupdate blocker with logging
 
Are there any better alternatives [other than this plugin] for the autobuy bug?

socrates2011 11-13-2011 09:49

Re: Anti-Crash (autobuy) & fullupdate blocker with logging
 
Another Translation, this time to Brasilian, but some think is in PT, because im from portugal and not from brasil :P

Quote:

[bp]
FUWARN = [Anti-Crash] %s! O 'Equipamento Completo' Esta Desactivado Neste Servidor (Aviso: %i/%i)
FUBAN = [Anti-Crash] %s Levou Ban Permanente. Razao: Tentativa de Crashar Servidor.
ABNA = [Anti-Crash] Equipamento Completo esta Desactivado!
ABNA2 = [Anti-Crash] Verifique as Configuracoes (cstrike/config.cfg)!

zahgelu 02-22-2012 15:23

Re: Anti-Crash (autobuy) & fullupdate blocker with logging
 
This plugin rezolv all exploit from HLDS? I need something a plugin for all script flood. :(


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

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