Ok I think I tested it enough this should be good for the final.
For those that dont know it, SiteKill is an external command which can be executed via the scheduler or via a dos box to kill certain connections in ioFTPD.
Goto
http://ftpservertools.tripod.com and visit the download page.
The site is not accessible for opera I heard, sorry it's tripod's fault.
Users of version 0.3 or 0.9 be aware the syntax has changed.
Parameters are any combination of
user=username - Kicks connections of user
ip=ipnr - Kicks connections of ip
ident=ident@ipnr - Kicks connections of ident@ip
host=hostname - Kicks connections of hostname
idle>seconds - Kicks idlers that are seconds idle
idle>=seconds - Kicks idlers that are seconds idle
path=somepath - Kicks connections on a path
group=groupname - Kicks connections from a maingroup
groups=groupname - Kicks connections from a group that the user is in
action=lastaction - Kicks connections with last action
flags=userflags - Kicks users with certain flags
times=all|once|nr - Number for the amount of kicks, all for all connections
service=ftp|http|telnet - kick only people on this service
servicename=name - name if ioftpd service (from ioftpd.ini) e.g. FTP_Service
up>nr - kick speed > nr for connections that are uploading K/s
up>=nr - kick speed >= nr for connections that are uploading K/s
up<nr - kick speed < nr for connections that are uploading K/s
up<=nr - kick speed <= nr for connections that are uploading K/s
down>nr - kick speed > nr for connections that are downloading K/s
down>=nr - kick speed >= nr for connections that are downloading K/s
down<nr - kick speed < nr for connections that are downloading K/s
down<=nr - kick speed <= nr for connections that are downloading K/s
transfer=idle|up|down|list - kick connections in the mentioned transfer mode
Preceed a parameter with a - and it will exclude that option
Wildcards are * and ? are allowed
Due to the windows rdirection (using < and >) you will need to surround your partial or complete query with double quotes.
Also when the string you comapre with has a space in it you need to surround the argument with double quotes.
Be aware that the parameters are used as AND so:
site kill groups=group1 groups=group2
will kill everyone belonging to group1 AND group2.
Thus someone only belonging to group1 will not be killed.
Examples:
site kill user=lamer - kills the user lamer
site kill user=lamer times=once - kills the user lamer once
site kill user=lamer times=25 - kills max 25 lamer users
site kill user=l*r - kills users that match the l*u wildcard so lamer looser leecher in this example but not winner
site kill ip=127.0.0.1 - kills the 127.0.0.1 connections
site kill ip=192.168.*.* - kills the 192.168.*.* connections
site kill "idle>120" - kills idlers that are longer then 120 secs idle
site kill group=l*s - kills connections with main group l*s so leechers, loosers, lamers
site kill action=noop - kills connections where the last command was NOOP
site kill ident=TEST@* - kills connections with TEST as ident
site kill user!=sitebot path=/movies/svcd/* "idle>120"
- kills all connections that are in /path/movies/svcd/ somewhere and that are 120 seconds or
more idle but dont kill user sitebot in this process
site kill servicename=FTP_Service "down<10"
- kill all ftp leechers that are downloaading < 10K/s
site kill "path=/Stay out *" "login>600"
- kill all ftp services that are logged in longer then 600 seconds.
How to use this command in ioFTPD?
Lets say we for example want to kick all idle ftp users.
[Schedule]
KillIdlers = 0,5,10,15,20,25,30,35,40,45,50,55 * * * ..\scripts\SiteKill.exe "idle>120" service=ftp
To run this same command from a tcl script you could use:
[exec -- "c:\\ioFTPD\\scripts\\SiteKill.exe" "idle>120" "service=ftp"]