Old 10-05-2003, 06:06 PM   #1
FTPServerTools
Senior Member
FlashFXP Beta Tester
ioFTPD Scripter
 
Join Date: Sep 2002
Posts: 543
Talking ioFTPD SiteKill for ioFTPD 5.x

Ok after intense testing I am happy to release version 2.0.1 of my SiteKill tool.
Be aware for those that used the version for 4.9.x, some minor changes have been made.
A quick repeat of the docs:
Code:
Parameters are any combination of
The following needs a string to compare and uses =, ==, !=, <> to compare, the string may have wildcards * and ?
When the string itself has a space in it you need to surround the comparison with double quotes
user=username                   - kick on user
ip=ipnr                         - kick on ip
ident=ident@ipnr                - kick on ident@ip
host=hostname                   - kick on hostname
path=somepath                   - kick on virtual path
vpath=somepath                  - kick on virtual path
rpath=somepath                  - kick on real path
file=somepath                   - kick on virtual filepath
vfile=somepath                  - kick on virtual filepath
rfile=somepath                  - kick on real filepath
service=name of service         - kick on servicename
group=groupname                 - kick on main group
groups=groupname                - kick on groups
admingroups=groupname           - kick on admingroups
action=lastaction               - kick on last FTP command
transfer=idle|up|down|list      - kick on transferstate
flags=userflags                 - kick on userflags
tagline=tagline                 - kick on tagline
The following needs a number to compare with and uses =, ==, <>, != to compare, but also <, <=, >, >= when surrounded by double quotes
idle=seconds                    - kick on idlers in seconds
idletime=seconds                - kick on idlers in seconds
logintime=seconds               - kick on logged in how many seconds
listtime=seconds                - kick on list in seconds
upime=seconds                   - kick on busy upload current file in seconds
downtime=seconds                - kick on busy download current file in seconds
listspeed=nr                    - kick on list speed in K/s
upspeed=nr                      - kick on upload speed in K/s
downspeed=nr                    - kick on download speed in K/s
uid=uid                         - kick on uid
gid=gid                         - kick on gid
times=all|once|nr          - Number for the amount of kicks, once, all or a number. all is the default
if you run with the first parameter debug then you get debug info


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.


Be aware that the things you type after the = are case insensitive
Allowed for wildcards are * and ?

Examples:
sitekill user=lamer                    - kills the user lamer once
sitekill user=lamer times=once         - kills the user lamer once
sitekill user=lamer times=25           - kills max 25 lamer users
sitekill user=l*r                      - kills users that match the l*r wildcard so lamer looser leecher in this example but not winner
sitekill ip=127.0.0.1                  - kills the 127.0.0.1 connections
sitekill ip=192.168.*.*                - kills the 192.168.*.* connections
sitekill "idletime>120"                - kills idlers that are longer then 120 secs idle
sitekill group=l*s                     - kills connections with main group l*s so leechers, loosers, lamers
sitekill action=noop                   - kills connections where the last command was NOOP
sitekill ident=TEST                    - kills connections with TEST as ident
sitekill user!=sitebot path=/movies/svcd/* "idletime>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
sitekill service=FTP_Service "downspeed<10"
                                        - kill all ftp leechers that are downloading < 10K/s
sitekill "vpath=/Stay out *" "logintime>600"
										- kill all ftp services that are logged in longer then 600 seconds in a path that I dont want them in.


Now if you run this command and it gives back: "uid=-1 can not be found in ..\etc\passwd" or something like that
then you may have a dead connection on your hands. It rarely happens but it can happen tho. Therefore I implemented
site kill uid so you can do site kill uid=-1 which would kill those dead connections.
For completeness I added site kill gid=  as well.


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 * * *       EXEC ..\scripts\SiteKill.exe "idletime>120" service=FTP_Service

or as a site command:
[Scripts]
KILL      = EXEC ..\scripts\sitekill.exe

To run this same command from a tcl script you could use:
[exec -- "c:\\ioFTPD\\scripts\\SiteKill.exe" "idletime>120" "service=FTP_Service"]
You can always grab the newest version from http://ftpservertools.com in the download section.
FTPServerTools is offline   Reply With Quote
Old 10-06-2003, 12:17 AM   #2
neoxed
Too much time...
FlashFXP Beta Tester
ioFTPD Scripter
 
Join Date: May 2003
Posts: 1,326
Default

nice stuff, i was waiting for this.
neoxed is offline   Reply With Quote
Old 10-06-2003, 02:10 AM   #3
The0ne
Member
 
Join Date: May 2003
Posts: 42
Default

excellent
The0ne is offline   Reply With Quote
Old 10-06-2003, 03:05 AM   #4
bounty
Senior Member
ioFTPD Scripter
 
Join Date: Aug 2002
Posts: 529
Default

really nice m8

big thx for this fine piece of software

have fun
bounty
bounty is offline   Reply With Quote
Old 10-06-2003, 03:54 AM   #5
MaistroX
Senior Member
FlashFXP Registered User
ioFTPD Registered User
 
Join Date: Jul 2002
Posts: 221
Unhappy

hmmm, I use for ex: "site kill user=MaistroX" , and then sitekill crashes and when I close the crashscreen it kill´s what I asked, thats odd !? what to do ?

I installed all right but instead of useing "KILL = EXEC ..\scripts\sitekill.exe"

since I run "ioFTPD version 5.0.13r"

I use "KILL = ..\scripts\sitekill.exe"

to get it to work at all.

+

I allso have 2 sevices "FTP_Service FTP_Service2" so whats the correct lines then to have commands work for both, what do I put in ioFTPD and were ?

please help.

ps. anyone yet maked a site command pack for all commands with sitekill for ffxp yet ?
MaistroX is offline   Reply With Quote
Old 10-06-2003, 05:29 AM   #6
FTPServerTools
Senior Member
FlashFXP Beta Tester
ioFTPD Scripter
 
Join Date: Sep 2002
Posts: 543
Default

I'll test it. I assume you are using it for ioFTPD 5.x!!!! You have to use SiteKill 1.0.6 for ioftpd 4.x!!! It shouldnt crash since I tested user=.... as well but I'll check again.
FTPServerTools is offline   Reply With Quote
Old 10-06-2003, 05:40 AM   #7
MaistroX
Senior Member
FlashFXP Registered User
ioFTPD Registered User
 
Join Date: Jul 2002
Posts: 221
Lightbulb

Quote:
Originally posted by MaistroX
..............................

since I run "ioFTPD version 5.0.13r"

..........................................

as said!
MaistroX is offline   Reply With Quote
Old 10-06-2003, 05:49 AM   #8
FTPServerTools
Senior Member
FlashFXP Beta Tester
ioFTPD Scripter
 
Join Date: Sep 2002
Posts: 543
Default

Try not to kill your own connection. I tested it and no crash or whatsoever happened here. Please run it in a command box using:
sitekill debug user=MaistroX
or meet me on #ioftpd and chat.
FTPServerTools is offline   Reply With Quote
Old 10-08-2003, 08:24 PM   #9
SomeoneWhoCares_2
Member
 
Join Date: Sep 2002
Posts: 87
Default

site kill debug doesnt show ident@ip like it used to what happened ?
SomeoneWhoCares_2 is offline   Reply With Quote
Old 10-09-2003, 01:54 PM   #10
kraxdaz
Member
ioFTPD Foundation User
 
Join Date: Jun 2003
Posts: 86
Default

big thx man
but ive this error


site kill "idle>10"
200-Bad compare parameter in idle>10
200-Bad compare parameter in idle>10
200-Totally 0 connections kicked
200 Command Successful.


in debug mode:


site kill debug "idle > 10"
200-Connection 0 uid=103 gid=101 Username=test Groupname=Admin
200-TimesToKill=-1 compare:idle > 10 ArgumentResult=BADWHAT, TotalResult=1
200-Bad compare parameter in idle > 10
200-Connection 1 uid=101 gid=101 Username=KraxDaz Groupname=Admin
200-TimesToKill=-1 compare:idle > 10 ArgumentResult=BADWHAT, TotalResult=1
200-Bad compare parameter in idle > 10
200-Totally 0 connections kicked
200 Command Successful.

someone can help me?
thx in advance
kraxdaz is offline   Reply With Quote
Old 10-10-2003, 08:03 AM   #11
FTPServerTools
Senior Member
FlashFXP Beta Tester
ioFTPD Scripter
 
Join Date: Sep 2002
Posts: 543
Default New version SiteKill 2.0.2

2.0.2:Fixed memory bug, and added the reason in the kick line why someone is kicked.

Be aware this version works only on ioFTPD 5.x
FTPServerTools is offline   Reply With Quote
Old 10-10-2003, 08:06 AM   #12
FTPServerTools
Senior Member
FlashFXP Beta Tester
ioFTPD Scripter
 
Join Date: Sep 2002
Posts: 543
Default

Quote:
I allso have 2 sevices "FTP_Service FTP_Service2" so whats the correct lines then to have commands work for both, what do I put in ioFTPD and were ?
Use site kill service=FTP_Service "idle>120" user!=ioFTPD
for example to kill everyone except ioFTPD from the FTP_Service service.
FTPServerTools is offline   Reply With Quote
Old 10-10-2003, 08:11 AM   #13
FTPServerTools
Senior Member
FlashFXP Beta Tester
ioFTPD Scripter
 
Join Date: Sep 2002
Posts: 543
Default

Quote:
site kill "idle>10"
200-Bad compare parameter in idle>10
200-Bad compare parameter in idle>10
200-Totally 0 connections kicked
Hmm are you sure you havent put an extra space in there??

Quote:
site kill debug "idle > 10"
200-Connection 0 uid=103 gid=101 Username=test Groupname=Admin
200-TimesToKill=-1 compare:idle > 10 ArgumentResult=BADWHAT, TotalResult=1
200-Bad compare parameter in idle > 10
200-Connection 1 uid=101 gid=101 Username=KraxDaz Groupname=Admin
200-TimesToKill=-1 compare:idle > 10 ArgumentResult=BADWHAT, TotalResult=1
200-Bad compare parameter in idle > 10
200-Totally 0 connections kicked
site kill debug "idle > 10" is not correct due to the extra spaces you have put in there. Hence BADWHAT, it doesnt recognize the comparison.
FTPServerTools is offline   Reply With Quote
Old 10-10-2003, 10:09 AM   #14
kraxdaz
Member
ioFTPD Foundation User
 
Join Date: Jun 2003
Posts: 86
Default

it is similar with site kill2 debug "idle>10"

Quote:
site kill2 debug "idle>10"
200-Connection 0 uid=103 gid=101 Username=teste Groupname=Admin
200-TimesToKill=-1 compare:idle>10 ArgumentResult=BADWHAT, TotalResult=1
200-Bad compare parameter in idle>10
200-Connection 1 uid=101 gid=101 Username=KraxDaz Groupname=Admin
200-TimesToKill=-1 compare:idle>10 ArgumentResult=BADWHAT, TotalResult=1
200-Bad compare parameter in idle>10
200-Totally 0 connections kicked, due to:idle>10
200 Command Successful.
and in ioftpd.ini:

Quote:

kill2 = SiteKill.exe
kill2 = =Admin
kraxdaz is offline   Reply With Quote
Old 10-10-2003, 04:17 PM   #15
rage2001
Junior Member
ioFTPD Foundation User
 
Join Date: Oct 2003
Posts: 20
Default

I have the same problem:

site kill debug "idle>10"
200-Connection 1 uid=109 gid=106 Username=rage Groupname=nukers
200-TimesToKill=-1 compare:idle>10 ArgumentResult=BADWHAT, TotalResult=1
200-Bad compare parameter in idle>10
200-Connection 2 uid=109 gid=106 Username=rage Groupname=nukers
200-TimesToKill=-1 compare:idle>10 ArgumentResult=BADWHAT, TotalResult=1
200-Bad compare parameter in idle>10
200-Totally 0 connections kicked, due to:idle>10
200 Command Successful.

Hope there is a fix soon... since having a problem with ghosts on the site... Keep up the great work... can be a very very useful scripot if we get past this error...
rage2001 is offline   Reply With Quote
Reply

Tags
download, ftp, kick, sitekill, upload

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 Off
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 05:30 AM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)