PDA

View Full Version : ioFTPD SiteKill for ioFTPD 5.x


FTPServerTools
10-05-2003, 06:06 PM
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:

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.

neoxed
10-06-2003, 12:17 AM
nice stuff, i was waiting for this. :D

The0ne
10-06-2003, 02:10 AM
excellent :)

bounty
10-06-2003, 03:05 AM
really nice m8

big thx for this fine piece of software ;)

have fun
bounty

MaistroX
10-06-2003, 03:54 AM
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 ? :)

FTPServerTools
10-06-2003, 05:29 AM
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.

MaistroX
10-06-2003, 05:40 AM
Originally posted by MaistroX
..............................

since I run "ioFTPD version 5.0.13r"

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


as said! ;)

FTPServerTools
10-06-2003, 05:49 AM
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.

SomeoneWhoCares_2
10-08-2003, 08:24 PM
site kill debug doesnt show ident@ip like it used to what happened ? :confused:

kraxdaz
10-09-2003, 01:54 PM
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

FTPServerTools
10-10-2003, 08:03 AM
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
10-10-2003, 08:06 AM
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
10-10-2003, 08:11 AM
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??


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.

kraxdaz
10-10-2003, 10:09 AM
it is similar with site kill2 debug "idle>10"


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:



kill2 = SiteKill.exe
kill2 = =Admin

rage2001
10-10-2003, 04:17 PM
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...

FTPServerTools
10-11-2003, 06:18 PM
Fixed:BADWHAT comparison result for a number
Changed:added idle as synonym to idletime.

Have fun with it.

Shouldnt this topic be sticky??

kraxdaz
10-11-2003, 06:57 PM
big thx man it works perfect :D

rage2001
10-11-2003, 08:10 PM
ran the newest one... crashes ioftpd after a few tests .. no error.. just cant connect to ftp .. and got to restart io .... It doesnt happen all the time, just after a few times of testing... as well:


when I do this: site kill user!=sitebot "idletime>30" .... shouldnt that NOT kill the site bot AND kill any person idling over 30 seconds

but it doesnt... it doesnt kill the sitebot.. but kills everypone else, no matter if their idletime was 2 seconds ... "idle>30" also doesnt work

kraxdaz
10-12-2003, 04:26 AM
site kill debug group!=Admin "idletime>60" service=FTP_Service
200-Connection 0 uid=103 gid=102 Username=test
Groupname=Test
200-CompareString:group!=Admin result:0
200-TimesToKill=-1 compare:group!=Admin ArgumentResult=EQ, TotalResult=1
200-Final compare result of all arguments EQ
200-Kicked: test *@127.0.0.1
200-CompareNumber:idletime>60 result:316744
200-TimesToKill=-2 compare:idletime>60 ArgumentResult=EQ, TotalResult=1
200-Final compare result of all arguments EQ
200-Kicked: test *@127.0.0.1
200-CompareString:service=FTP_Service result:1
200-TimesToKill=-3 compare:service=FTP_Service ArgumentResult=EQ, TotalResult=1
200-Final compare result of all arguments EQ
200-Kicked: teste *@127.0.0.1
200-Connection 1 uid=101 gid=101 Username=kraxdaz Groupname=Admin
200-CompareString:group!=Admin result:1
200-TimesToKill=-4 compare:group!=Admin ArgumentResult=NEQ, TotalResult=1
200-Totally 3 connections kicked, due to:group!=Adminidletime>60service=FTP_Service
200 Command Successful.


when i execute site kill debug group!=Admin "idletime>60" service=FTP_Service

it kick teste after 11seconds idle
it is similar with site kill debug group!=Admin "idle>60" service=FTP_Service

but not kill me on group admin (normal)

and he said 200-Totally 3 connections kicked, due to:group!=Adminidletime>60service=FTP_Service

but there is only one connection kicked (test)

thx in advance

FTPServerTools
10-12-2003, 05:34 PM
I cant get it to crash, please find me a way to do that and describe how you do it. The other thing I found but I want to include that crash fix.

rage2001
10-12-2003, 05:48 PM
I will run a few more tests in debug.. see if i can notice anything... Sometimes I need to restart ioftpd after testing this a few times...

Will post back in a few mins...

rage2001
10-12-2003, 06:19 PM
OK. Well I cant get any info in debug mode...

It doesnt really crash ... just wont let this user log in as follows:

1. sitebot is logged in...
2. In one Flash FXP i have a user called load logged in ... under my ip. In the other window of flash fxp I have my siteop logged in called rage.
3. in another flash fxp I have rage logged in again.

now I wait a bit doing site who's with the siteop rage in the 3rd one above... then after it gets to about 40 seconds idletime for users above I do: site kill user!=sitebot "idletime>30"

It will kill the 2 rage connections .... as well as the load connection .... and leave the sitebot online ....

Then if i do this: connect with 1 rage.. then the load connection... both will connect .. but THE THIRD connection will not come back...

its hard to explain.... if you come on irc, I can give u a better explanation, maybe u can radmin in and I can show u exactly what happens.... nick is rage2001 or rage2002 in #ioftpd ot iobanana

MaistroX
10-13-2003, 05:38 AM
sitekill now works a "little" to good for me, even I get kicked out after set time ! :(

How to I change so me and others on site with "1M" can idle how long we want , meanÃ*ng , so "1M" are NOT included by "KillIdlers = 0,5,10,15,20,25,30,35,40,45,50,55 * * * ..\scripts\ioFTPD_SiteKill\SiteKill.exe "idletime>120" service=FTP_Service service=FTP_Service2" ? :)

FTPServerTools
10-13-2003, 08:05 AM
I'm busy on the update and have found the idle error.
You can use flags!=*1M* for example.. :) But due to the idle error you would get killed also (wrongly so). Bare with me I'm busy on the update.

MaistroX
10-13-2003, 08:29 AM
oki, I´ll wait :)

FTPServerTools
10-13-2003, 08:55 AM
2.0.4:Fixed:user!=y idle>x kicked wrongly.
Fixed:upload time was wrong
Changed:logintime is now back to normal, so you can kick everyone logged in for x seconds or more
Added:login for ascii representation so you can kick everyone logged in according to a wildcard date/time setting


New examples:
sitekill "logintime>3600" - kill everyone logged in for more then an hour
sitekill login=????????08???? - kill everyone at 08:00:00 to 08:59:59

SomeoneWhoCares_2
10-13-2003, 09:20 AM
running site kill debug kills every single connection without a kick message :confused:

FTPServerTools
10-13-2003, 10:00 AM
Which is correct. If I say:
kill "idle>100" I actually say kill ALL users with idle>100
Thus if I remove "idle>100" then kill ALL users simply remains.

rage2001
10-13-2003, 02:33 PM
Well the new version I dont seen to be crashing ... I dunno .. as long as it isnt happening anymore its fine with me... Thanks for the awesome script....

This works perfect:

site kill groups!=SiTEOP groups!=nukers "idletime>30"

But i have a question ... under [Scheduler], i do not have the EXEC commands... so i was curious will this work below, along with ALL those group and idletime commands there???

KillIdlers = 0,5,10,15,20,25,30,35,40,45,50,55 * * * ..\scripts\SiteKill.exe groups!=SiTEOP groups!=nukers "idletime>120" service=FTP_Service

Thanks
rage

kraxdaz
10-13-2003, 02:59 PM
thx to u FTPServerTools it works good :)

FTPServerTools
10-13-2003, 03:29 PM
Well the exec is needed for ioftpd I read. If you execute an exe or so you need to put EXEC infront of it and for a tcl script you need to put TCL in front of it. Check your default ioftpd.ini and you'll see it there. All I did was follow that example.

Jog
10-13-2003, 07:24 PM
i suppose that this script can be useful for someone.

it's a killidlers.tcl script for bots, u can use with ioBanana o dZSBot.

# A simple public killidlers.tcl by Jog
# works on ioFTPDSiteKill 2.0.4

bind pub -|- !SITENAMEkill pub_killidlers

proc pub_killidlers {nick uhost hand chan args} {
set lcl_sitename "-SITENAME- \[KILL-IDLERS\] "

if {[isop $nick $chan]} {
putserv "PRIVMSG $chan :$lcl_sitename Kikking all idlers ..."
set reply [exec -keepnewline -- "c:\\ioFTPD\\scripts\\SiteKill.exe" "user!=sitebot" "idletime>3" "service=FTP_Service"]
set output "..."
set msg [split $reply "\n"]
foreach line $msg {
putserv "PRIVMSG $nick :$lcl_sitename $line"
if { [string first "Totally 0" $line ] > -1 } {
putserv "PRIVMSG $chan :$lcl_sitename No idlers at the moment."
} elseif { [string first "Totally" $line ] > -1 } {
set pos [expr int([string first " connections" $line]-1)]
set num_kiked [string range $line 8 $pos]
putserv "PRIVMSG $chan :$lcl_sitename Kikked $num_kiked idlers."
}
}
} else {
putserv "PRIVMSG $chan :$lcl_sitename Only OPs can kill idlers."
}
}

putlog "ioFTPDSiteKill 2.0.4 -Jog TCL- loaded"

this script catches the output of SiteKill and announce in the chan that is kikkink idlers and the number of users kiked, using private message sai the detailed kills to person who launched the command!

anyway u had to personalize the exec call and the sitename !!!

MaistroX
10-14-2003, 03:11 AM
Sorry to have to say this, but latest version seems to crash, I my guess is that it relates to the "[Scheduler]" in ioFTPD.ini file ! :(

My u can tell me IF there´s anything I could possibly change in ,y line to get it NOT to crash with this current version ?

my Line ->

"
KillIdlers = 0,5,10,15,20,25,30,35,40,45,50,55 * * * ..\scripts\ioFTPD_SiteKill\SiteKill.exe "idletime>120" service=FTP_Service service=FTP_Service2
"

THX.

FTPServerTools
10-14-2003, 04:21 AM
Hmm I think it is because sitekill gives a reply back and io may not be able to handle that. A reply makes little use in the scheduler.
Maybe d1 can confirm this for me.
Please try redirecting the output to nul e.g.
KillIdlers = 0,5,10,15,20,25,30,35,40,45,50,55 * * * ..\scripts\SiteKill.exe groups!=SiTEOP groups!=nukers "idletime>120" service=FTP_Service >nul

That might do the trick. If not tell me and I'll add a new argument that stops giving output and would thus not crash accordingly. I think adding >nul should do the trick.

MaistroX
10-14-2003, 04:32 AM
THX I´ll try :)

MaistroX
10-14-2003, 05:52 AM
restarted, and still crashes ! :(

FTPServerTools
10-14-2003, 08:18 AM
2.0.5:Changed:Cosmetic update on total connections killed, the reasons were not seperated by a space.
Added:parameter to disable the output (needed when running from the scheduler)

If the very first parameter is debug then all kinds of debug info is given out. It helps me to resolve bugs.
Example:
sitekill debug "idle>120"
If the very first parameter is silent then there will be no output given whatsoever. This is needed when sitekill runs in the scheduler.
Example:
sitekill silent "idle>120"

How to use this command in ioFTPD 5.x? (not 5.0.x)
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 silent "idletime>120" service=FTP_Service

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

Use the same lines without the EXEC for ioFTPD 5.0.x

FTPServerTools
10-24-2003, 06:00 AM
2.0.6:Added:transfer=idle/up/down/list seems I forgot that one

:rolleyes:

SomeoneWhoCares_2
11-06-2003, 05:13 PM
dunno how long it stopped working but i am now getting these messages -> Error:Shared memory is not recognized by ioFTPD :confused:

MidKnight
11-06-2003, 07:50 PM
trying to get it to kick last commands except for certain users, in this case flags with M

site kill action flags!=M =noop

[11:49:32] site kill flags!=M action =noop
[11:49:32] 200-Bad compare parameter in =noop
[11:49:32] 200-Bad compare parameter in =noop
[11:49:32] 200-Bad compare parameter in =noop
[11:49:32] 200-Bad compare parameter in =noop
[11:49:32] 200-Bad compare parameter in =noop
[11:49:32] 200-Bad compare parameter in =noop
[11:49:32] 200-Bad compare parameter in =noop
[11:49:32] 200-Bad compare parameter in =noop
[11:49:32] 200-Bad compare parameter in =noop
[11:49:32] 200-Bad compare parameter in =noop
[11:49:32] 200-Bad compare parameter in =noop
[11:49:32] 200-Bad compare parameter in =noop
[11:49:32] 200-Bad compare parameter in =noop
[11:49:32] 200-Totally 0 connections kicked, due to:flags!=M action =noop

MidKnight
11-06-2003, 09:45 PM
using the following setup nothing happens at all, no one gets kicked, is there something i have missed?

im using v2.0.6 of sitekill

--------
[Scheduler]
###
# Scheduler
#
# Event = <minutes> <hours> <day of week> <day of month> Command
#
# Internal Commands:
#
# &Reset : Resets upload/download counters
# &Service_Update : Reloads devices and Restarts services, if bind ip of service has changed
#
Reset = 0 0 * * &Reset
Service_Update = 10,30,50 * * * &Service_Update
Rotate_Log = 0 0 * * EXEC ..\scripts\ioBanana.exe rotatelog
Day_Stats = 59 23 * * EXEC ..\scripts\ioBanana.exe daystats
KillIdlers = 0,5,10,15,20,25,30,35,40,45,50,55 * * * EXEC ..\scripts\SiteKill.exe silent "idletime>120" service=FTP_Service service=Local_FTP_Service

MidKnight
11-06-2003, 11:15 PM
found why the scheduler wasn't working...... i am running io as a service

FTPServerTools
11-07-2003, 06:31 AM
Hmm I didnt know that the scheduler then doesnt run. Be sure to have the 'interact with desktop' enabled and try again. It might run fine then, since some scripts give some responses back and thus they may not execute. Anyway I hope d1 reads this and checks it.

darkone
11-07-2003, 08:54 AM
It's debugged throught out... (as someone complained that scheduler causes him crashes.. but it was something completely different)

FTPServerTools
11-08-2003, 02:53 PM
The message is correct. Try:
site kill flags!=M action=noop

Be aware tho probably all users will have flags !=M you probably wanted to use:
site kill flags!=*M* action=noop

Oops that was a reply on an older question... Well whoever posted the question will know what it means.

Pappez
12-10-2003, 11:45 AM
It isn't work whit the last version of ioftpd.5.3.9u; i have a problem with kill because isn't kill idlers


17.37.20] 200-Connection 0 uid=0 gid=102 Username=Pappez Groupname=ADMiN
[17.37.20] 200-CompareNumber:idletime>60 result:931
[17.37.20] 200-TimesToKill=-1 compare:idletime>60 ArgumentResult=EQ, TotalResult=1
[17.37.20] 200-Final compare result of all arguments EQ
[17.37.20] 200-Kicked: Pappez *@*.*.*.*
[17.37.20] 200-Connection 1 uid=112 gid=102 Username=diablo Groupname=ADMiN
[17.37.20] 200-TimesToKill=-2 compare:idletime>60 ArgumentResult=NEQ, TotalResult=1
[17.37.20] 200-Final compare result of all arguments NEQ
[17.37.20] 200-Connection 2 uid=112 gid=102 Username=diablo Groupname=ADMiN
[17.37.20] 200-TimesToKill=-2 compare:idletime>60 ArgumentResult=NEQ, TotalResult=1
[17.37.20] 200-Final compare result of all arguments NEQ
[17.37.20] 200-Connection 3 uid=123 gid=0 Username=lordnikon Groupname=BiC
[17.37.20] 200-TimesToKill=-2 compare:idletime>60 ArgumentResult=NEQ, TotalResult=1
[17.37.20] 200-Final compare result of all arguments NEQ
[17.37.20] 200-Connection 4 uid=112 gid=102 Username=diablo Groupname=ADMiN
[17.37.20] 200-CompareNumber:idletime>60 result:758
[17.37.20] 200-TimesToKill=-2 compare:idletime>60 ArgumentResult=EQ, TotalResult=1
[17.37.20] 200-Final compare result of all arguments EQ
[17.37.20] 200-Kicked: diablo *@*.*.*.*
[17.37.20] 200-Connection 5 uid=112 gid=102 Username=diablo Groupname=ADMiN
[17.37.20] 200-TimesToKill=-3 compare:idletime>60 ArgumentResult=NEQ, TotalResult=1
[17.37.20] 200-Final compare result of all arguments NEQ
[17.37.20] 200-Connection 6 uid=112 gid=102 Username=diablo Groupname=ADMiN
[17.37.20] 200-TimesToKill=-3 compare:idletime>60 ArgumentResult=NEQ, TotalResult=1
[17.37.20] 200-Final compare result of all arguments NEQ
[17.37.20] 200-Connection 7 uid=112 gid=102 Username=diablo Groupname=ADMiN
[17.37.20] 200-TimesToKill=-3 compare:idletime>60 ArgumentResult=NEQ, TotalResult=1
[17.37.20] 200-Final compare result of all arguments NEQ
[17.37.20] 200-Connection 8 uid=0 gid=102 Username=Pappez Groupname=ADMiN
[17.37.20] 200-CompareNumber:idletime>60 result:730
[17.37.20] 200-TimesToKill=-3 compare:idletime>60 ArgumentResult=EQ, TotalResult=1
[17.37.20] 200-Final compare result of all arguments EQ
[17.37.20] 200-Kicked: Pappez *@*.*.*.*
[17.37.20] 200-Connection 9 uid=112 gid=102 Username=diablo Groupname=ADMiN
[17.37.20] 200-TimesToKill=-4 compare:idletime>60 ArgumentResult=NEQ, TotalResult=1
[17.37.20] 200-Final compare result of all arguments NEQ
[17.37.20] 200-Connection 10 uid=112 gid=102 Username=diablo Groupname=ADMiN
[17.37.20] 200-TimesToKill=-4 compare:idletime>60 ArgumentResult=NEQ, TotalResult=1
[17.37.20] 200-Final compare result of all arguments NEQ
[17.37.20] 200-Connection 11 uid=112 gid=102 Username=diablo Groupname=ADMiN
[17.37.20] 200-TimesToKill=-4 compare:idletime>60 ArgumentResult=NEQ, TotalResult=1
[17.37.20] 200-Final compare result of all arguments NEQ
[17.37.20] 200-Connection 12 uid=112 gid=102 Username=diablo Groupname=ADMiN
[17.37.20] 200-TimesToKill=-4 compare:idletime>60 ArgumentResult=NEQ, TotalResult=1
[17.37.20] 200-Final compare result of all arguments NEQ
[17.37.20] 200-Connection 13 uid=0 gid=102 Username=Pappez Groupname=ADMiN
[17.37.20] 200-CompareNumber:idletime>60 result:218
[17.37.20] 200-TimesToKill=-4 compare:idletime>60 ArgumentResult=EQ, TotalResult=1
[17.37.20] 200-Final compare result of all arguments EQ
[17.37.20] 200-Kicked: Pappez *@*.*.*.*
[17.37.20] 200-Connection 14 uid=112 gid=102 Username=diablo Groupname=ADMiN
[17.37.20] 200-TimesToKill=-5 compare:idletime>60 ArgumentResult=NEQ, TotalResult=1
[17.37.20] 200-Final compare result of all arguments NEQ
[17.37.20] 200-Connection 15 uid=112 gid=102 Username=diablo Groupname=ADMiN
[17.37.20] 200-TimesToKill=-5 compare:idletime>60 ArgumentResult=NEQ, TotalResult=1
[17.37.20] 200-Final compare result of all arguments NEQ
[17.37.20] 200-Connection 16 uid=0 gid=102 Username=Pappez Groupname=ADMiN
[17.37.20] 200-CompareNumber:idletime>60 result:8
[17.37.20] 200-TimesToKill=-5 compare:idletime>60 ArgumentResult=NEQ, TotalResult=1
[17.37.20] 200-Final compare result of all arguments NEQ
[17.37.20] 200-Connection 17 uid=135 gid=0 Username=davide Groupname=BiC
[17.37.20] 200-TimesToKill=-5 compare:idletime>60 ArgumentResult=NEQ, TotalResult=1
[17.37.20] 200-Final compare result of all arguments NEQ
[17.37.20] 200-Totally 4 connections kicked, due to:idletime>60
[17.37.20] 200 Command successful.



[5:38pm] <+[****]> -****- [STATUS] + idlers:
[5:38pm] <+[****]> -****- [STATUS] + Pappez@ADMiN is idle for 16m 24s - Online for 00:-39:-34
[5:38pm] <+[****]> -****- [STATUS] + Pappez@ADMiN is idle for 13m 03s - Online for 00:-46:-45
[5:38pm] <+[****]> -****- [STATUS] + Pappez@ADMiN is idle for 04m 31s - Online for 00:-55:-3
[5:38pm] <+[****]> -****- [STATUS] + Pappez@ADMiN is idle for 00m 53s - Online for 00:-57:-44


Why?

FTPServerTools
12-11-2003, 03:58 AM
idle for 16m 24s - Online for 00:-39:-34
??? online for -39 minutes????
It looks like soemthing is screwed in your ioftpd. Restart io and try again. The internal online counter seem to be negative.

It looks like io gets the kill commands properly tho:
[17.37.20] 200-Final compare result of all arguments EQ
[17.37.20] 200-Kicked: Pappez *@*.*.*.*

So if they in the end dont get killed there must be some internal reason why.

If you get more negative online counts please explain how you did it, you might have found a bug in io then.
Be sure to use the right tools tho. I think io is blocking the user to be kicked. I can not force kick a user out when io doesnt allow it. It might be a hanging script so check your io threads and see if there is one taking much more cpu then normal, or check your io process and check the cpu use.

ADDiCT
12-11-2003, 07:39 AM
[5:38pm] <+[****]> -****- [STATUS] + idlers:
[5:38pm] <+[****]> -****- [STATUS] + Pappez@ADMiN is idle for 16m 24s - Online for 00:-39:-34
[5:38pm] <+[****]> -****- [STATUS] + Pappez@ADMiN is idle for 13m 03s - Online for 00:-46:-45
[5:38pm] <+[****]> -****- [STATUS] + Pappez@ADMiN is idle for 04m 31s - Online for 00:-55:-3
[5:38pm] <+[****]> -****- [STATUS] + Pappez@ADMiN is idle for 00m 53s - Online for 00:-57:-44
play around with time_offset in sitewho.ini, try 0 or 7200 instead of 3600
the negative values are not an ioFTPD problem, but mine :)

Pappez
12-11-2003, 12:25 PM
thx a lot for the sitewho.ini but the problem with ioftpd stay here.


[6:17pm] <+[****]> -****- [STATUS] + idlers:
[6:17pm] <+[****]> -****- [STATUS] + Pappez@ADMiN is idle for 03m 00s - Online for 00:03:01
[6:17pm] <+[****]> -****- [STATUS] + Pappez@ADMiN is idle for 02m 15s - Online for 00:02:16
[6:17pm] <@Pappez> !duckkill
[6:17pm] *[****]* Kicked: Pappez *@*.*.*.*
[6:17pm] *[****]* Kicked: Pappez *@*.*.*.*
[6:17pm] *[****]* Totally 2 connections kicked, due to:idletime>10 service=FTP_Service

after min....

[6:21pm] <@Pappez> !duckidlers
[6:21pm] <+[****]> -****- [STATUS] + idlers:
[6:21pm] <+[****]> -****- [STATUS] + Pappez@ADMiN is idle for 07m 07s - Online for 00:07:08
[6:21pm] <+[****]> -****- [STATUS] + Pappez@ADMiN is idle for 06m 22s - Online for 00:06:23


why it isn't kill my idlers ?

Jog
12-11-2003, 06:21 PM
ioFTPD 5.2.15r
ioSiteKill 2.0.6

in scheduler i set:
KillIdlers = 0,5,10,15,20,25,30,35,40,45,50,55 * * * EXEC ..\scripts\SiteKill.exe silent user!=sitebot "idletime>120" service=FTP_Service

a lot of time in the day i had this error:

12-04-2003 10:57:03 Scheduler event 'KillIdlers' returned error.
12-05-2003 14:38:52 Scheduler event 'KillIdlers' returned error.
12-05-2003 15:29:44 Scheduler event 'KillIdlers' returned error.
12-05-2003 15:32:25 Scheduler event 'KillIdlers' returned error.
12-05-2003 15:32:26 Scheduler event 'KillIdlers' returned error.
12-05-2003 15:32:26 Scheduler event 'KillIdlers' returned error.
12-05-2003 15:32:27 Scheduler event 'KillIdlers' returned error.
12-05-2003 15:32:27 Scheduler event 'KillIdlers' returned error.
12-05-2003 15:32:27 Scheduler event 'KillIdlers' returned error.
12-05-2003 15:32:27 Scheduler event 'KillIdlers' returned error.
12-05-2003 20:54:56 Scheduler event 'KillIdlers' returned error.
12-05-2003 21:44:57 Scheduler event 'KillIdlers' returned error.
12-05-2003 21:44:58 Scheduler event 'KillIdlers' returned error.
12-05-2003 21:44:58 Scheduler event 'KillIdlers' returned error.
12-05-2003 21:44:59 Scheduler event 'KillIdlers' returned error.
12-05-2003 21:44:59 Scheduler event 'KillIdlers' returned error.
12-05-2003 21:44:59 Scheduler event 'KillIdlers' returned error.


if i look in the event viewer i had this:
0000: 41 70 70 6c 69 63 61 74 Applicat
0008: 69 6f 6e 20 46 61 69 6c ion Fail
0010: 75 72 65 20 20 73 69 74 ure sit
0018: 65 6b 69 6c 6c 2e 65 78 ekill.ex
0020: 65 20 32 2e 30 2e 36 2e e 2.0.6.
0028: 30 20 69 6e 20 6d 73 76 0 in msv
0030: 63 72 74 2e 64 6c 6c 20 crt.dll
0038: 37 2e 30 2e 32 36 30 30 7.0.2600
0040: 2e 31 31 30 36 20 61 74 .1106 at
0048: 20 6f 66 66 73 65 74 20 offset
0050: 30 30 30 33 32 31 33 62 0003213b
0058: 0d 0a ..
i had this on WinXP (Home & Pro) and also on Win2000 Server

have u an idea of the problem??

FTPServerTools
12-12-2003, 02:23 AM
Well with your log I can surely find it out I bet, since it contains the address where it failed.
I wonder what it is since I see no reason for a sudden crash.


Hmm I dont seem to have enough info to be able to trace this back. The address 0x3213b looks like a strange address. I would need drwatson logs to see what is really going on. Is there any way you can reproduce this??

It should be known that sitekill actually sends a kill message to ioftpd. If ioftpd decides to not listen to it then there is nothing that sitekill can do. For example if someone is running a script and you want to kick the connection then io wont normally let you. Eevn tho io properly recognizes the message. This behaviour is proper tho, you wouldnt want your files to be messed up due to a user being prematurely kicked would you?
If you can get a situation in which it occurs please open a command box and do this command:
..\scripts\SiteKill.exe debug user!=sitebot "idletime>120" service=FTP_Service

And give me the info it gives...

NeO``
03-15-2004, 01:05 PM
Nice tool thx for resolving my ghosts problems ^:p

toki
03-15-2004, 01:25 PM
never had any ghost probs in 5.8.4

only 5.6.x had ghost probs for some io users.

greez toki

mr_F_2
03-15-2004, 06:20 PM
great work ftpservertools, gonna run this on my site ;) thanks

FTPServerTools
03-15-2004, 06:39 PM
I keep doing my best.... :)

Granny Smith
03-26-2004, 01:16 PM
perfect work :)

TSG
04-29-2004, 10:04 AM
16:52:47 > site kill debug service=FTP_Service "downspeed<50"
16:52:47 200-Connection 0 cid=0 uid=0 gid=0 Username=TSG Groupname=ioFTPD
16:52:47 200-CompareString:service=FTP_Service result:1
16:52:47 200-TimesToKill=-1 compare:service=FTP_Service ArgumentResult=EQ, TotalResult=1
16:52:47 200-TimesToKill=-1 compare:downspeed<50 ArgumentResult=NEQ, TotalResult=1
16:52:47 200-Final compare result of all arguments NEQ
16:52:47 200-Connection 1 cid=1 uid=0 gid=0 Username=TSG Groupname=ioFTPD
16:52:47 200-CompareString:service=FTP_Service result:1
16:52:47 200-TimesToKill=-1 compare:service=FTP_Service ArgumentResult=EQ, TotalResult=1
16:52:47 200-TimesToKill=-1 compare:downspeed<50 ArgumentResult=NEQ, TotalResult=1
16:52:47 200-Final compare result of all arguments NEQ
16:52:47 200-Totally 0 connections kicked, due to:service=FTP_Service downspeed<50
16:52:47 500-Invalid argument: service=FTP_Service "downspeed<50".
16:52:47 500 Command failed.



what have i done wrong??


and will this [Scheduler] work??
killspeed = 0,5,10,15,20,25,30,35,40,45,50,55 * * * EXEC ..\scripts\SiteKill.exe silent service=FTP_Service "downspeed<50"

nothing hapens when i have this in [Scheduler].

jboy53
05-18-2004, 01:04 PM
I keep getting this error when trying to execute sitekill 200-Check ioFTPD.ini - Password_File= can not be found, can anybody shed some light to it.. i did a search 1st nothing like it.. [EDIT] - Fixed it my bad script pointing to older sitekill.exe but still not killing the connections. i will investage more ... sorry for the prob.

FTPServerTools
05-18-2004, 01:23 PM
To TSG: the reply you get in debug mode is actually sitekill telling me that there is nothing to kill. It finds a match on the FTP_Service (hence result:1) but downspeed<50 seems not to match for the first and the second user you had logged in.


to jboy53: Password_File= is nowhere coded into sitekill 5.x, you are using the 4.x version on 5.x apparently.

jboy53
05-18-2004, 01:30 PM
sorry was editing as u posted.. my bad only checked version number and twigged then so sorry for that .

jboy53
05-18-2004, 02:03 PM
sorry about before however .... its now 2.0.7.0 ..

200-Kicked: me *@(EDITED)
200-Connection 8 cid=8 uid=104 gid=102 Username=me Groupname=iND
200-CompareNumber:idletime>120 result:9
200-TimesToKill=-9 compare:idletime>120 ArgumentResult=NEQ, TotalResult=1
200-Final compare result of all arguments NEQ
200-Totally 8 connections kicked, due to:idletime>120
500-Invalid argument: "idletime>120".
500 Command failed.


it still didnt actually kill/kick the 8 connections

is there anything that the "debug" tells you?

nicolay
09-17-2004, 07:55 AM
Is it possible to override the internal ioFTPD site kill?

FTPServerTools
09-17-2004, 11:25 AM
eeh I think it is possible but to be honest I never tried it.

nicolay
09-17-2004, 06:46 PM
Why I'm asking is because SITE KILL gives your output + the internal, so if i do SITE KILL "downspeed<10"... then it gives your scripts output and command failed from ioFTPD internal.

Would be nice if thats fixeable without changing command to something else then SITE KILL ;) -no biggy though, and great script btw! works like a charm...

Keep it up...

neoxed
09-17-2004, 08:29 PM
It's been possible to replace internal commands since Beta-5.4.0.
From the Changelog:
Change: Internal site commands can be chained with scripts (internal command is last in chain, and not executed, if chain is broken) The 'chain' is broken by returning non-zero. ;)

nicolay
09-18-2004, 05:46 PM
Hmm, i dont quite get it. It exec's both the internal and the ioSiteKill when i do SITE KILL "something"

im a bit newbie :P

Mouton
09-18-2004, 05:50 PM
Normal. sitekill needs to be changed to return non-zero if you want to do that.
Wait for author.

FTPServerTools
09-19-2004, 01:09 PM
I am the author, so I'll have a look for you. It should be a minor change. :)

nicolay
09-20-2004, 04:52 PM
Thanks man! :D

Excelent work! Looking forward to a "fix"...

FTPServerTools
09-21-2004, 04:19 AM
Try the current one, I changed the return code to 1.

nicolay
09-21-2004, 07:49 AM
What can I say...


Perfect!

nicolay
09-21-2004, 07:21 PM
[Scheduler]

KillIdlers = 0,5,10,15,20,25,30,35,40,45,50,55 * * * EXEC ..\scripts\ioSiteKill\SiteKill.exe silent "idletime>120" service=FTP_Service

error.log
(...)
09-22-2004 01:20:45 Scheduler event 'KillIdlers' returned error.
09-22-2004 01:25:45 Scheduler event 'KillIdlers' returned error.
09-22-2004 01:30:46 Scheduler event 'KillIdlers' returned error.
09-22-2004 01:35:45 Scheduler event 'KillIdlers' returned error.
09-22-2004 01:40:49 Scheduler event 'KillIdlers' returned error.
09-22-2004 01:45:45 Scheduler event 'KillIdlers' returned error.
09-22-2004 01:50:46 Scheduler event 'KillIdlers' returned error.
09-22-2004 01:55:45 Scheduler event 'KillIdlers' returned error.
09-22-2004 02:00:46 Scheduler event 'KillIdlers' returned error.
09-22-2004 02:05:45 Scheduler event 'KillIdlers' returned error.
09-22-2004 02:10:46 Scheduler event 'KillIdlers' returned error.

I know its been asked before, but is there a solution?
(SITE CMD works fine, no error in debug)

ioFTPD 5.8.5r

neoxed
09-21-2004, 07:55 PM
Hehe, when an application returns non-zero, it's considered an "error" to ioFTPD. However, at the same time, it can be used to halt all following events (as I mentioned above). I guess adding a parameter to make this behavior optional (returning non-zero) would work. Sorry RAMRAM, I should have mentioned this earlier. :)

FTPServerTools
09-22-2004, 04:19 AM
Ok go and play with the current version.
You need to set call it with override if you override the SITE KICK command. Do not use override if you dont override.. doh sounds stupidly simple...

nicolay
09-22-2004, 09:37 AM
Hm thats weird, this new version just keeps crashing on me

FTPServerTools
09-22-2004, 06:25 PM
How do you run it? It shouldnt crash of course (I did test it namely).

nicolay
09-23-2004, 05:08 AM
All I did was replace the .exe, and now it crashes when i do any site cmd. SITE KILL "idletime>120" / SITE KILL override "idletime>120". I get that windows crash dialog that SiteKill had a problem and had to be closed...

I didnt change any system ini settings from last exe.

[Scheduler]
KillIdlers = 0,5,10,15,20,25,30,35,40,45,50,55 * * * EXEC ..\scripts\ioSiteKill\SiteKill.exe silent "idletime>120" service=FTP_Service

[FTP_Custom_Commands]
KILL = EXEC ..\scripts\ioSiteKill\Sitekill.exe

I dont get any error in error.log from scheduler anymore though, but dont know if it even does anything :P

[R] site kill "idletime>120"
(LAGG)
[R] 550 Command failed.

FTPServerTools
09-24-2004, 06:56 AM
It is fixed again. Silly stupid error from my side.

nicolay
09-24-2004, 07:05 AM
I'm probably just doing something wrong here, but it keeps crashing occationally.

I think it's the scheduler crashing, i get in error.log
09-25-2004 18:36:12 Scheduler event 'KillIdlers' returned error.

KillIdlers = 0,5,10,15,20,25,30,35,40,45,50,55 * * * EXEC ..\scripts\ioSiteKill\SiteKill.exe silent "idletime>120" service=FTP_Service

Jog
10-14-2004, 01:12 PM
if i try this command from command line:

SiteKill.exe debug "idletime>120" > log.txt

but the connections wasn't kiked :(

ioFTPD 5.8.5r
ioShareDB
ioA , pSio, newdir, dZSbot all last version
SiteKill 2.0.11

i attach the log file!

FTPServerTools
10-14-2004, 04:53 PM
SiteKill uses ioFTPD's internal killing method. This means that if you cant kill the connection using ioFTPD itself that I cant do it either. This can occur when the user is logged in and he has a script running (or hanging). Can you please check all the subprocesses of ioFTPD (use ProcessExplorer). And thanks for the log.txt this makes it easier for me to see what is going on. according to the log the kill is sent properly...

Jog
10-16-2004, 04:58 PM
i retry now to launch this command:

SiteKill.exe debug "idletime>120" > log.txt

i attach the log.txt and the ProcessExplorer log for ioFTPD.exe

I use ioTrayIcon to launch ioFTPD ... if this information is useful .. :D

FTPServerTools
10-17-2004, 10:28 AM
this log didnt help, all it does is tell me that there were attempts to kill the connection for a user which failed due to the point that your script is hanging or whatever reason. ioftpd doesnt allow the kick to happen ergo sitekill cant make it happen. If this kind of behaviour occurs a lot you should use ioProcess to see which scripts are hanging in io. WIth ioProcess yiu can also kill those processes.

Example of use:
On connection 1 I have a small program that is hanging. It apparently is taking quite some seconds.
This program is args.exe which I called from an event in ioFTPD.
So I type via connection 2:
site proc (so I execute ioProcess.exe under ioFTPD).

And as reply it gives me:
200- pid: process started at kernel user
200- exefile yyyy-mm-dd hh:mm:ss mm:ss mm:ss
200- 3992: args.exe 2004-04-21 21:12:23 00:03 00:52
200- 4060: ioProcess.exe 2004-04-21 22:24:04 00:00 00:00
200 Command successful.

The 1st column is the process id.
The 2nd column is the exe that is called.
The 3rd and 4th column are the date/time when the process was started, this is a criteria
for determining a hanging process. In this example process 3992 has been hanging for more then
a full hour.
The 5th column is the time used in the kernel-mode, here 3 seconds (for pid=3992)
The 6th column is the time used in the user-mode, here 52 seconds (for pid=3992)
If one of these columns is quite high then apparently the process is hanging or very busy.

Since 3992 seems to be hanging I type:

site proc kill 3992

with result:

200-args.exe terminated
200 Command successful.


Dont forget to check the date/time to see which of the processes is hanging.

FTPServerTools
10-18-2004, 07:39 AM
to nicolay:
I need a drwtsn32.exe log because whatever you are doing I dont get it to crash. Also can you find a way to get it to crash consistently? It treied with users on, no users, and with your commandline but it failed to crash here.

Do check that you are running version 2.0.11 and that you are running the sitekill 5.x version for ioftpd 5.x ..

dink-puller
10-31-2004, 04:34 AM
I haven't been able to do anything with this tool without it crashing. (version 2.0.11) Also, trying to run it without EXEC in ioFTPD.ini produces a failed command, with no other results.

/site version
200-Running ioFTPD version 5-8-5r
::If there is a user connected whose last action was PWD
/site SITEKILL action=PWD produces:
550 Command failed. (SiteKill.exe crashes, see below for offsets)
::If there isn't a user connected whose last action was PWD
200-Totally 0 connections kicked, due to:action=PWD
200 Command successful.

ioFTPD.ini
[Scripts]
SITEKILL = EXEC ..\scripts\SiteKill\SiteKill.exe
[FTP_SITE_Permissions]
SITEKILL = M

/site proc
200- pid: process started at kernel user
200- exefile yyyy-mm-dd hh:mm:ss mm:ss mm:ss
200- 1520: ioProcess.exe 2004-10-31 09:46:03 00:00 00:00
200 Command successful.

no hanging processes.

FTPServerTools
10-31-2004, 05:16 PM
Thanks for your mail, with some luck I can recreate the crash and thus solve it quickly.

dink-puller
11-01-2004, 03:46 AM
Just wondering if this has something to do with msvcrt.dll and XP sp2? btw, program quits at that exact same place, when executing SiteKill with any parameters, not just the ones I posted above. Hope that helps, can't wait to see this finished.

FTPServerTools
11-01-2004, 05:55 AM
Can you make a drwtsn32 report for it? (just run drwtsn32 and let it crash) I can use the log.... You dont have to make a huge memory dump. Apparently sp2 doesnt give any decent error comment as sp2 used to give. msvcrt.dll is the dll that contains many standard routines so it may go wrong in a printf or a stringcompare or whatever. THe log should give a little bit more info (I hope).

dink-puller
11-02-2004, 07:53 AM
Crap, I can't make it crash now, everything works great. Wait a second, that's a good thing!! If it happens again, I'll send a crash report.
Thanks, and take care.