Luigi Auriemma

aluigi.org (ARCHIVE-ONLY FORUM!)
It is currently 19 Jul 2012 14:04

All times are UTC [ DST ]





Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 13 posts ] 
Author Message
 Post subject: Universal game players limiter
PostPosted: 28 Jan 2009 17:26 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
only a simple idea, nothing else:

http://aluigi.org/patches/playerslimiter.zip

feel free to try it and to ask here for doubts, help, comments, suggestions or feedback.

note that for the games based on the Quake 3 engine (so for games like Quake 3, Jedi Knight/Academy, RTCW, Enemy Territory, Soldier of Fortune II, Call of Duty 1/2/4/5, Elite Force I/II and so on) I have worked on a specific experimental project which uses a similar idea but an additional cross-checking of the informations which allow to really limit the number of players from the same IP:

http://aluigi.org/patches/q3playersperip.zip

the following is the Introduction in the text file of the zip of playerslimiter:
Code:
This is an experimental beta project which does the following simple
job: hooking recvfrom and dropping a certain packet if it's received
within some seconds.

So this can be considered an experimental way to "limit" the fake
players bug or just to reduce the amount of players from the same IP
but it must be NOT considered a real solution.
It's only a simple idea, nothing else so don't expect miracles.

The following is the concept of this small project:
- monitor all the incoming packets
- if the packet starts with the same bytes contained in the file
  packet.dat the source IP address and the current time are stored in
  the internal database
- if the same packet (a packet which starts with the same bytes of
  packet.dat) is received again from the same IP within 15 seconds it
  will be set to a length of zero so that the main program (the game
  server) will ignore it and the new player will not join

the time is recorded each time the packet is received so if the player
from IP 1.2.3.4 sends the join packet each 5 seconds it will be ever
ignored (except the first one obviously) because the time of the last
packet received is ever minor than 15 seconds.

The idea is very basic just because the purpose is applying it to
almost any existent game with a minimal configuration (packet.dat).
The only downsides are that:
- this is a time based limitation in the joining of the players from
  the same IP and NOT a way to limit the maximum number of players from
  the same IP, so an user which launches 16 clients on his same machine
  with 15 seconds of delay between each connection is still able to
  fill the server without problems
- there is no protection versus spoofed packets for obvious technical
  and logical limits
- if a legit player joins the server and then disconnect immediately
  and rejoins within 15 seconds he will fail

The source code of the project is very small and enough commented so is
possible to customize it for matching the exact needs of the game to
which adding this "IP limitation".
It's even possible to enhance it adding major features like smart
filters, a rudimental firewall or anything else which can be
implemented at that level (recvfrom).


Top
 Profile  
 
 
 Post subject: Re: Universal game players limiter
PostPosted: 28 Jan 2009 22:49 

Joined: 14 Aug 2007 22:48
Posts: 1
NICE JOBS!!!!!!!

GROXOO!!!!

IDOLO!!!!

Congratulations!!!!!!!!!!!!!!!!!!!!!!!!


Top
 Profile  
 
 Post subject: Re: Universal game players limiter
PostPosted: 28 Jan 2009 23:52 

Joined: 24 Sep 2007 02:12
Posts: 1114
Location: http://sethioz.co.uk
ah it seems you managed to make it :)
i will try it on something else than game server and see what happens, it should limit every data you dump into the .dat right ?!


Top
 Profile  
 
 Post subject: Re: Universal game players limiter
PostPosted: 29 Jan 2009 01:40 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
it limits any packet which starts with the data contained in packet.dat, so if it contains ????????getinfo the clients will be able to query the q3 server max one time each 15 seconds.

note: don't do the tests using netcat as udp server (example: nc -l -p 80 -v -v -u -n) because it uses recv and not recvfrom for receving the udp packets and so the hooking doesn't touch it.


Top
 Profile  
 
 Post subject: Re: Universal game players limiter
PostPosted: 29 Jan 2009 11:36 

Joined: 14 Nov 2008 16:37
Posts: 15
Heh. Good Job. Finally i have protected my server. =)


Top
 Profile  
 
 Post subject: Re: Universal game players limiter
PostPosted: 05 Feb 2009 18:23 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
I have created another experimental project referred to tcp connections:

http://aluigi.org/patches/tcplimiter.zip

although the default configuration should work enough well with the majority of small tcp servers it's suggested to check the 3 fields explained in the text file in the package.


Top
 Profile  
 
 Post subject: Re: Universal game players limiter
PostPosted: 10 Jan 2010 05:11 

Joined: 07 Jan 2010 12:09
Posts: 6
http://aluigi.org/patches/q3playersperip.zip seems to be a dead link.


Top
 Profile  
 
 Post subject: Re: Universal game players limiter
PostPosted: 10 Jan 2010 14:10 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
because that project has been abandoned, now exists the playerslimiter one:
http://aluigi.org/patches.htm#playerslimiter


Top
 Profile  
 
 Post subject: Re: Universal game players limiter
PostPosted: 10 May 2010 16:11 

Joined: 09 Sep 2008 12:15
Posts: 27
Hi Aluigi,
For Enemy Territory do i need to rename packet.dat file ?

All files goes where etded.exe is right?


Top
 Profile  
 
 Post subject: Re: Universal game players limiter
PostPosted: 10 May 2010 23:52 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
yes it must be renamed as packet.dat and placed with ws2_32.dll of proxocket and myproxocket.dll in the same folder where resides etded.exe


Top
 Profile  
 
 Post subject: Re: Universal game players limiter
PostPosted: 05 Sep 2010 01:57 

Joined: 05 Sep 2010 01:24
Posts: 4
Location: Rosario, Argentina
This works with HALF LIFE 1 ENGINE?


Last edited by RaMMz on 11 Sep 2010 06:59, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Universal game players limiter
PostPosted: 05 Sep 2010 13:33 

Joined: 24 Sep 2007 02:12
Posts: 1114
Location: http://sethioz.co.uk
what is this, read the damn usage in the file that comes in the .zip
it is explained.
you think that it magically reconizes all the games in world and limits players ? ..ugh all it takes is to open included file and read.


Top
 Profile  
 
 Post subject: Re: Universal game players limiter
PostPosted: 08 Sep 2010 10:36 

Joined: 24 Jun 2010 10:04
Posts: 70
Location: aluigi not @ home
if in the game folder you have both ws2_32.dll and packet.dat (for example quake3_packet.dat renamed to packet.dat) then it should work.
if it doesn't work it's possible that your operating system doesn't support this specific method or that packet.dat is not correct for your game or that specific protocol


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 13 posts ] 

All times are UTC [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron