AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   orpheu, catching NET_QueuePacket (https://forums.alliedmods.net/showthread.php?t=155230)

preepunk 04-19-2011 05:44

orpheu, catching NET_QueuePacket
 
some nasty players are breaking my server

they are sending some kind of spam
i can see in console
NET_QueuePacket: Oversize packet from 1.2.3.4
if i addip 0 this 1.2.3.4 - the spam stops
but ips are different

can anyone suggest me a code so orphey will catch this message
NET_QueuePacket: Oversize packet from
and return ip as a string so i can ban it forever.

ps i tried to modify this
https://forums.alliedmods.net/showpo...07&postcount=2
but no use

thanks!

Arkshine 04-19-2011 12:32

Re: orpheu, catching NET_QueuePacket
 
Sounds not too hard. Will try later.

Clauu 04-21-2011 17:40

Re: orpheu, catching NET_QueuePacket
 
Quote:

Originally Posted by Arkshine (Post 1453623)
Sounds not too hard. Will try later.

Can you please? It can be something separated from orpheu module like a amxmodx plugin .. now this is the new way to hammer servers :roll:

Arkshine 04-22-2011 06:53

Re: orpheu, catching NET_QueuePacket
 
1 Attachment(s)
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" );         OrpheuRegisterHook( HandleFuncNETQueuePacket, "NET_QueuePacket_Pre", OrpheuHookPre );     OrpheuRegisterHook( HandleFuncNETQueuePacket, "NET_QueuePacket_Post", OrpheuHookPost ); }   public NET_QueuePacket_Pre() {     HandleHookConPrintf = OrpheuRegisterHook( HandleFuncConPrintf, "Con_Printf" ); } public Con_Printf( const fmt[], const arg[] ) {     static const message[] = "Oversize packet from ";         if( contain( fmt, message ) >= 0 )     {         new ip[ 16 ], i, c;                 while( i < charsmax( ip ) && ( c = fmt[ i + charsmax( message ) ] ) && c != ':' )         {             ip[ i++ ] = c;         }                   ip[ i ] = EOS;         log_to_file( "NET_Packet_Spammer.log", "Blocking %s", ip );                 server_cmd( "addip 0 ^"%s^"", ip );         server_exec();     } } public NET_QueuePacket_Post() {     OrpheuUnregisterHook( HandleHookConPrintf ); }

preepunk 04-22-2011 07:49

Re: orpheu, catching NET_QueuePacket
 
Now im waiting for the attack, I will say if it works or not.
Thank you!
Спасибо! :)

Clauu 04-22-2011 10:20

Re: orpheu, catching NET_QueuePacket
 
It can be done without the orpheu module?

Arkshine 04-22-2011 10:28

Re: orpheu, catching NET_QueuePacket
 
What's wrong using Orpheu ? Tell me, and please don't say "because I don't want to add another module", it's really a bullshit.

It exists a way, but not worth because inefficient and would hang up your server.
by enabling condebug (command), it generates a file named "qconsole" in hlds/. All the messages using Con_Printf() will be printed there, including the message wanted. So a poor, inefficient and not worth method would be to parse the whole file searching for this message. So you would need to parse all the time each x seconds. It will generate constant lags.

Clauu 04-22-2011 11:31

Re: orpheu, catching NET_QueuePacket
 
Ok, thanks for your heavy arguments.

katna 08-27-2011 18:32

Re: orpheu, catching NET_QueuePacket
 
ty, how can i test the explot to see if it still works?

bibu 08-27-2011 20:15

Re: orpheu, catching NET_QueuePacket
 
Make a log text when you're banning the player.


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

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