Raised This Month: $51 Target: $400
 12% 

orpheu to rehlds DdoS / Query Flood


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 08-01-2017 , 03:44   orpheu to rehlds DdoS / Query Flood
Reply With Quote #1

can someone re-write this script for rehlds
Thanks
PHP Code:
#include <amxmodx>
#include <orpheu>

new OrpheuFunction:HandleFuncNETQueuePacket;
new 
OrpheuFunction:HandleFuncConPrintf;

new 
OrpheuHook:HandleHookConPrintf;

public 
plugin_init()
{
    
register_plugin"Ban NET Packet Spammer""1.0.1""Arkshine" );
    
    
HandleFuncNETQueuePacket OrpheuGetFunction"NET_QueuePacket" );
    
HandleFuncConPrintf      OrpheuGetFunction"Con_Printf" );
    
    
OrpheuRegisterHookHandleFuncNETQueuePacket"NET_QueuePacket_Pre"OrpheuHookPre );
    
OrpheuRegisterHookHandleFuncNETQueuePacket"NET_QueuePacket_Post"OrpheuHookPost );
}   

public 
NET_QueuePacket_Pre()
{
    
HandleHookConPrintf OrpheuRegisterHookHandleFuncConPrintf"Con_Printf" );
}

public 
Con_Printf( const fmt[], const arg[] )
{
    static const 
message[] = "Oversize packet from ";
    
    if( 
containfmtmessage ) >= )
    {
        new 
ip16 ], ic;
        
        while( 
charsmaxip ) && ( fmtcharsmaxmessage ) ] ) && != ':' 
        { 
            
ipi++ ] = c
        }   
        
        
ip] = EOS;

        
log_to_file"NET_Packet_Spammer.log""Blocking %s"ip );
        
        
server_cmd"addip 0 ^"%s^""ip );
        
server_exec();
    }
}

public 
NET_QueuePacket_Post()
{
    
OrpheuUnregisterHookHandleHookConPrintf );

__________________
Thanks everyone. #miss_you_all
indraraj striker is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-01-2017 , 04:13   Re: orpheu to rehlds DdoS / Query Flood
Reply With Quote #2

Is such plugin really needed and especially with ReHLDS?

Also, I remember you have cvars like max_queries_sec, max_queries_sec_global and max_queries_window to control the rate. (http://txdv.github.io/cstrike-cvarlist/).
__________________
Arkshine is offline
leonardo121
Member
Join Date: Sep 2013
Old 08-01-2017 , 07:25   Re: orpheu to rehlds DdoS / Query Flood
Reply With Quote #3

Quote:
Originally Posted by indraraj striker View Post
can someone re-write this script for rehlds
Thanks
PHP Code:
#include <amxmodx>
#include <orpheu>

new OrpheuFunction:HandleFuncNETQueuePacket;
new 
OrpheuFunction:HandleFuncConPrintf;

new 
OrpheuHook:HandleHookConPrintf;

public 
plugin_init()
{
    
register_plugin"Ban NET Packet Spammer""1.0.1""Arkshine" );
    
    
HandleFuncNETQueuePacket OrpheuGetFunction"NET_QueuePacket" );
    
HandleFuncConPrintf      OrpheuGetFunction"Con_Printf" );
    
    
OrpheuRegisterHookHandleFuncNETQueuePacket"NET_QueuePacket_Pre"OrpheuHookPre );
    
OrpheuRegisterHookHandleFuncNETQueuePacket"NET_QueuePacket_Post"OrpheuHookPost );
}   

public 
NET_QueuePacket_Pre()
{
    
HandleHookConPrintf OrpheuRegisterHookHandleFuncConPrintf"Con_Printf" );
}

public 
Con_Printf( const fmt[], const arg[] )
{
    static const 
message[] = "Oversize packet from ";
    
    if( 
containfmtmessage ) >= )
    {
        new 
ip16 ], ic;
        
        while( 
charsmaxip ) && ( fmtcharsmaxmessage ) ] ) && != ':' 
        { 
            
ipi++ ] = c
        }   
        
        
ip] = EOS;

        
log_to_file"NET_Packet_Spammer.log""Blocking %s"ip );
        
        
server_cmd"addip 0 ^"%s^""ip );
        
server_exec();
    }
}

public 
NET_QueuePacket_Post()
{
    
OrpheuUnregisterHookHandleHookConPrintf );

btw, this script is working ?
__________________
" In the end it doesn't even matter " - Linkin Park
leonardo121 is offline
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 08-01-2017 , 09:07   Re: orpheu to rehlds DdoS / Query Flood
Reply With Quote #4

Quote:
Originally Posted by Arkshine View Post
Is such plugin really needed and especially with ReHLDS?

Also, I remember you have cvars like max_queries_sec, max_queries_sec_global and max_queries_window to control the rate. (http://txdv.github.io/cstrike-cvarlist/).
yes if you can
This is already requested by some other guy in github of rehlds
Link : https://github.com/dreamstalker/rehlds/issues/427
__________________
Thanks everyone. #miss_you_all
indraraj striker is offline
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 08-01-2017 , 09:08   Re: orpheu to rehlds DdoS / Query Flood
Reply With Quote #5

Quote:
Originally Posted by leonardo121 View Post
btw, this script is working ?
yes it work
__________________
Thanks everyone. #miss_you_all
indraraj striker 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 17:17.


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