ioFTPd Version: 7.0.0
Here is part of the ioFTPD.ini file:
Code:
[FTP_Pre-Command_Events]
user = TCL ..\scripts\test.itcl pre_user
pass = TCL ..\scripts\test.itcl pre_pass
[FTP_Post-Command_Events]
user = TCL ..\scripts\test.itcl post_user
pass = TCL ..\scripts\test.itcl post_pass
And here is "..\scripts\test.itcl":
Code:
iputs -nobuffer $args
But this's what I get when I log in:
Code:
220 FTP Server ready.
user ioFTPD
pre_user user ioFTPD
331 Password required for ioFTPD.
pass ioFTPD
pre_pass pass ioFTPD
post_pass pass ioFTPD
230-User ioFTPD from 127.0.0.1, welcome to our FTP server.
...
The question is, where is the "post_user" command? I've noticed that it said "These are called after the real command successfully completed." in [FTP_Post-Command_Events].
Is that because the error code (ioPrefix) is 3xx- instead of 2xx-, so that the "user" command never returns success?
==========
Another question:
How can I do if I want to count the total transfer amount of one specified connection (CID) in an ioFTPd iTCL script? I have browsed the
iTCL commands list reference by Yil, but it turned out to be nothing. Finally, I tried to modify the source file: commented out Line 469 in MessageHandler.c can make "client who(OnlineData)>>TransferSize" not to be zeroed when a new transfer begins. (What is commented is: "lpClient->Static.i64TotalBytesTransfered = 0;") But there still remains a problem, which is, when the transfer speed is high, "TransferSize" will be quite smaller than the actual transferred size. I think there's a good chance the reason is when the transfer is completed, the rest amount won't been counted. But I have no idea how to do to fix this.
==========
Thank Yil and any others who finish reading my post.
p.s. I've made two changes to ioFTPD v7. One is adding "Deny_Encrypted_Data" to [FTP_Service] to choose not to allow ssl data transfer while ssl auth and list are permitted; Another one is adding ClientType data to OnlineData in iTCL. And do not allow ClientType change, i.e. deny the second CLNT request. I wish Yil could add these features to newer ioFTPD versions, and I can provide the modified source file if needed.