PDA

View Full Version : Readd script


Harm
11-17-2003, 06:11 PM
Some users asked for a readd script for ioFTPD, so here it is.

This is a first version and it's probably not as fast as it could be.
And it might (must ?) have some bugs or missing features.

Feel free to report bugs or wishes.


Usage:
======

Users are now automaticaly added to the readd database when
they are deleted.
Users that are already present in the readd database can't be
added using the 'SITE ADDUSER' and 'SITE GADDUSER'
commands.
Users with a '!' in their username can't be added (due to some
itcl issues with such usernames).
Users readded are logged to SysOp.log.

New site commands:
SITE READDS lists all users in the readd database.
SITE READD <user> readds the user.
SITE PURGE <user> remove the user from the readd database.
SITE SETDELMSG <user> <message> replaces the default message
displayed to deleted users when they login with this one for
this user.

Changelog:
==========
v0.6
Added a message for deleted users next time they login.
Added custom login messages for deleted users.
Merged all site commands scripts into one itcl file.
Fixed security issues.
Special thanks to b>d>>s and B0unty.

:banana:

MaistroX
11-17-2003, 06:48 PM
Super nice ! :)

Harm
11-17-2003, 07:11 PM
Latest version is v0.6.

It is available to foundation members.

Pharaoh
11-17-2003, 07:54 PM
What does this script do mate?

stLancer_2
11-17-2003, 09:59 PM
waiting for this script so long, thx verymuch, but i found a small bug, if you don't put an empty ReaddIdTable file in \etc, it will cause error... maybe need to add a line in your script to check the file is there.


if { ! [file exists etc/ReaddIdTable] } { set newid [open etc/ReaddIdTable a] ; close $newid }



:D

-=DoBBeR=-
11-18-2003, 03:57 AM
harm u are the man =)) I'll try this script out as soon as I get back from univerity later 2day..

-=DoBBeR=-
11-18-2003, 10:50 AM
5. Edit user/pass/port in readd.itcl carefully.
Note: the user needs the '1' flag.

hmm, cant find this in readd.tcl, and when I do site deluser testuser it connection just hangs, nothing happends..

edit: created the ReaddIdTable file, and now it works

MaistroX
11-18-2003, 11:14 AM
have same problem, tryed both with ffxp and with ioGui (should be same thing, both hangs.

from ioGui ->

16:56:02 > deluser xxxxx
16:56:16 > CID LISTBOT


then nothing.

-=DoBBeR=-
11-18-2003, 12:20 PM
try creating an empty ReaddIdTable in ..\etc
that made it work just fine here..

MaistroX
11-18-2003, 12:55 PM
Originally posted by -=DoBBeR=-
try creating an empty ReaddIdTable in ..\etc
that made it work just fine here..

how u mean a dir or...? :)

-=DoBBeR=-
11-18-2003, 01:51 PM
a file =)

MaistroX
11-18-2003, 02:44 PM
Worked like a charm, THX!

=



20:43:17 > deluser *****
20:43:17 200-User successfully added to the readd database.
20:43:17 200 User '*****' successfully deleted.

-=DoBBeR=-
11-25-2003, 06:49 PM
11-26-2003 00:00:29 "..\scripts\readd\reset.itcl" terminated abnormally
--------------------------- ErrorInfo ----------------------------
extra characters after close-brace
while compiling
"if {[string match "*monthdn*" "$lined"]"
("while" body line 6)
while compiling
"while {![eof $infile]} {
gets $infile lined
if {![string match "*monthdn*" "$lined"]} {
puts $outfile "$lined"
}
if {[string mat..."
("if" then script line 4)
while compiling
"if {[string equal "month" [l

I get that crap in a file called SystemError.log, and it does the same thing every night.

Harm
11-26-2003, 01:05 AM
I noticed that yesterday and i'm currently testing the fix.
I'll most probably update it this afternoon or tomorrow.

Harm
11-29-2003, 03:48 AM
This bug and one other related to non existant users are fixed in v0.4.

-=DoBBeR=-
11-29-2003, 05:55 AM
nice work m8 tnx =)

beast00
12-02-2003, 02:58 PM
in my case.

by readdv0.5, there is occoured fatal error.

in here.

[Scheduler]
DailyReset = 0 0 * * TCL ..\scripts\readd\reset.itcl day
WeeklyReset = 0 0 * 0 TCL ..\scripts\readd\reset.itcl week
MonthlyReset = 0 0 1 * TCL ..\scripts\readd\reset.itcl month

after i apply it in ioftpd.ini, it is occoured fatal error when i excute ioftpd.exe.

========
Visual C++ Runtime error. ioftpd.exe.
========

it is my fault? tell me plz..

i want to solve this promblem.

thx.

MaistroX
12-02-2003, 03:35 PM
Noop, not your foult, had the same, think Harm is working on a solution to this .

Harm
12-03-2003, 01:55 PM
Not my fault too ;)

There's a little bug in the scheduler.
http://www.ioftpd.com/board/showthread.php?s=&postid=14101#post14101

beast00
12-04-2003, 12:13 AM
ahhhhhh~..:)

ok... thx..harm...
thx. MaistroX...

Sersen
01-26-2004, 10:13 AM
maybe someone can write a login script for this nice readd script..maybe looking like this here:

USER test
331 Password required for test.
PASS (hidden)
200 .---------------------------------------.
200 | ACCESS DENIED - YOU HAVE BEEN DELETED |
200 .---------------------------------------.
Connection failed

so the user will get a message..would be great :)

Harm
01-26-2004, 10:36 AM
This has already been added to the next version.
But I don't have time to finish it at the moment.

-=DoBBeR=-
01-26-2004, 10:40 AM
set deletemsg ".---------------------------------------.
| ACCESS DENIED - YOU HAVE BEEN DELETED |
.---------------------------------------."

change to this in ioLOGIN.itcl

Sersen
01-26-2004, 10:44 AM
good to know thanks harm :) too bad you don´t have the time to finish this nice little script

-=DoBBeR=-: there is not such a file ;) maybe you mixed something up with ioReincarnation

Harm
02-13-2004, 09:45 AM
Here you go!

ioREADD v0.6 is available to foundation members.
See first post for changelog.

Sersen
02-13-2004, 04:08 PM
cool.

very nice one...gonna test it now :)

thanks harm

MidasKing
02-23-2004, 09:48 AM
Thanks Harm,

the script work fine....

but....

the message displayed to deleted users with SITE SETDELMSG <user> <message> not accept text with spaces:(


This can be changed???:D

Or i'm abusing? :p

Harm
02-23-2004, 11:55 AM
It does accept spaces.
Use: SITE SETDELMSG <user> "<message>"
enclosing the message with quotes.

MidasKing
02-23-2004, 01:00 PM
Ohhhh!!!...

Ths Harm...

My bad...

:D

toki
03-11-2004, 03:48 AM
whats that? setdelmsg works/works notworks.... i dunno why but setting up a delmsg sometimes works and sometimes not.

SITE deluser test
200-User successfully added to the readd database.
200 deluser Command successful.
SITE setdelmsg test hello
200 Command successful.
SITE setdelmsg test "hello"
200 Command successful.
SITE setdelmsg test "hello hello"
200 Command successful.
SITE setdelmsg test "hello hello 1 2 3"
200-Message 'hello hello 1 2 3' successfully added for user 'test'
200 Command successful.
SITE setdelmsg test "hello hello 1 2 3 4"
200-Message 'hello hello 1 2 3 4' successfully added for user 'test'
200 Command successful.
SITE setdelmsg test " my dear hello hello 1 2 3 4"
200 Command successful.
SITE setdelmsg test "my dear hello hello 1 2 3 4"
200 Command successful.
SITE setdelmsg test "HELLO"
200-Message 'HELLO' successfully added for user 'test'
200 Command successful.
SITE setdelmsg test "last try"
200 Command successful.

harm?

greez toki

Harm
03-11-2004, 06:08 AM
This is fixed in v0.7.
Greets to toki for the report.

-=DoBBeR=-
11-08-2004, 04:01 PM
I think I found a bug.

site deluser
You don't have access to this command.

site deluser testuser
200-User successfully added to the readd database.
200 deluser Command successful.

when I just enter site deluser without a user after I guess I should get a helptext or something, not the above result.

great script though =)

Harm
11-12-2004, 08:48 AM
Indeed. This has been fixed in my version.

I will release it soon.
Any suggestion or bug report ?

-=DoBBeR=-
11-12-2004, 06:09 PM
everything else working just fine here, at least atm ;)