Raised This Month: $ Target: $400
 0% 

orpheu to rehlds DdoS / Query Flood


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
leonardo121
Member
Join Date: Sep 2013
Old 08-01-2017 , 07:25   Re: orpheu to rehlds DdoS / Query Flood
Reply With Quote #4

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
 



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 22:49.


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