Raised This Month: $32 Target: $400
 8% 

orpheu, catching NET_QueuePacket


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
preepunk
Member
Join Date: Jul 2009
Location: Universe, Milky Way
Old 04-19-2011 , 05:44   orpheu, catching NET_QueuePacket
Reply With Quote #1

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!
preepunk is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-19-2011 , 12:32   Re: orpheu, catching NET_QueuePacket
Reply With Quote #2

Sounds not too hard. Will try later.
__________________
Arkshine is offline
Clauu
Senior Member
Join Date: Feb 2008
Location: RO
Old 04-21-2011 , 17:40   Re: orpheu, catching NET_QueuePacket
Reply With Quote #3

Quote:
Originally Posted by Arkshine View Post
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

Last edited by Clauu; 04-21-2011 at 17:43.
Clauu is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-22-2011 , 06:53   Re: orpheu, catching NET_QueuePacket
Reply With Quote #4

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 ); }
Attached Files
File Type: zip [signatures]ban_net_packet_spammer.zip (2.4 KB, 1779 views)
__________________

Last edited by Arkshine; 10-25-2012 at 11:31.
Arkshine is offline
preepunk
Member
Join Date: Jul 2009
Location: Universe, Milky Way
Old 04-22-2011 , 07:49   Re: orpheu, catching NET_QueuePacket
Reply With Quote #5

Now im waiting for the attack, I will say if it works or not.
Thank you!
Спасибо!
preepunk is offline
Clauu
Senior Member
Join Date: Feb 2008
Location: RO
Old 04-22-2011 , 10:20   Re: orpheu, catching NET_QueuePacket
Reply With Quote #6

It can be done without the orpheu module?
Clauu is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-22-2011 , 10:28   Re: orpheu, catching NET_QueuePacket
Reply With Quote #7

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.
__________________
Arkshine is offline
Clauu
Senior Member
Join Date: Feb 2008
Location: RO
Old 04-22-2011 , 11:31   Re: orpheu, catching NET_QueuePacket
Reply With Quote #8

Ok, thanks for your heavy arguments.
Clauu is offline
katna
Senior Member
Join Date: May 2010
Old 08-27-2011 , 18:32   Re: orpheu, catching NET_QueuePacket
Reply With Quote #9

ty, how can i test the explot to see if it still works?
katna is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 08-27-2011 , 20:15   Re: orpheu, catching NET_QueuePacket
Reply With Quote #10

Make a log text when you're banning the player.
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
Reply


Thread Tools
Display Modes

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 06:03.


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