PDA

View Full Version : site ban & who script


ofloofxp
11-17-2003, 01:46 AM
this is ftp who that shows ip, and ban script that kills connection witch prevents em from downloading and shows msg njoy

Commands:
site ftpban addban <nummeric ip> : Adds a ban
site ftpban delban <nummeric ip> : Deletes a ban
site ftpban banlist : Shows currnet bannend ips
site ftpwho : Shows logged on UserName, Uid, ip

ill add commands for eggdrop soon ;) Just to lazy today :p

check http://ftpservertools.tripod.com for additional kill options cause after you banned you need to kill em ;)

Mouton
11-17-2003, 09:12 AM
I suggest that to check for ban on login, u use the [Pre] PASS event.
Just return != 0 if the ip is banned, and io won't allow login.
Make sure the message you echo shows the right error code though ("530- bla bla" probably...)

Ofloo
11-17-2003, 04:04 PM
oh does it give errors write now ? i mean doesn't it function well it does show a error msg i know that but is there something wrong with the script besides that it doesn't show an 530 error msg ?

also not entirly clear what you mean cause i am not realy that familiar with ioftpd .. just know tcl so could you xplain closer what your refering to ??

maybe syntax or something .. ? i know about [pre] section i mean i know it is there but why and what it is used for ..? so could you give me a clue of its output ?? so i can trigger an event from there , or where i can read up on how to trigger a error msg

darkone
11-17-2003, 04:49 PM
[pre] events are executed before the actual command. If event returns with error, command will not be executed at all.

Ofloo
11-18-2003, 07:06 AM
could ya give some example i do understand what you mean just not sur on how that works .. ?

b>d>>s
11-18-2003, 09:24 AM
global ioerror

then set ioerror non zero, ie. set ioerror 2
then, return.

this will stop event.

for example see READD script by harm on this board.

Ofloo
11-18-2003, 11:43 AM
there is not realy an example.

if i use same way it won't out the msg nor the error..

i need to be able to use iputs -nobuffer, .. if i use it other wize like iputs "530..
or iputs "-530.. well it doesn't show the msg and with the -nobuffer i get result:
230--500 Your ip (127.0.0.1) is banned from this ftp server.
230-500- Your ip (127.0.0.1) is banned from this ftp server.
230-500 Your ip (127.0.0.1) is banned from this ftp server.
and i did set ioerror 1 set ioerror 2 tryed em both even tryed 0 :p

still no result ..

Ofloo
11-24-2003, 07:51 AM
updated some stuff added some small features and no the error thing is not added yet, don't have time to read about it now do it later cause from what ive seen until now, .. well don't understand crap, also keep in mind that your using global from a itcl script, witch means global = variable added within a proc, or $::var = same but this is an itcl variable while i am using tcl not itcl .. not sur if thats the same or how that works out tho ..

MidKnight
12-18-2003, 01:08 AM
would it be possible if we could also add a small line with reason of banning, so when the sysops look at the list of banned IP, they can also see why that ip was banned

iOn`mU
12-19-2003, 06:18 AM
Hi i'm using your script for a week or so.
I wanted to know if there a way to ban an ip range

like site ftpban addban 192.168.*.*

I have try this but your regexp doesnt allow * characters.
Can you Implement?

Thanks in advance!

iOn`

Ofloo
12-20-2003, 01:21 AM
if i got time then ill add it ;) in a weak or so ..