Go Back   FlashFXP Forums > > > >

ADDiCT's scripts sitewho.exe, ioGroups, ioGui, ioLimitTransfers, ioSecureAdduser

Reply
 
Thread Tools Rating: Thread Rating: 10 votes, 5.00 average. Display Modes
Old 10-28-2004, 11:31 AM   #1
dink-puller
Member
ioFTPD Foundation User
 
dink-puller's Avatar
 
Join Date: Sep 2004
Posts: 58
Default add cmds to ioGui2 menus

I've added a few other custom commands to ioFTPD, like banning, which I'd like to add to the ioGui2 menus:
%(clientip) seems to return the hostname, what can I use to return the ip address? %(ipaddr) didn't work neither did %(ip) , and can I just add my own commands like:

menu_activity = Ban %(ipaddr) | $ftp SITE ADDBAN %(ipaddr) ?

also, can I pipe commands like,

menu_activity = kick/ban %(cid)@%(ipaddr) | $ftp SITE ADDBAN %(ipaddr) | $ftp site kill %(cid)

and can I do all this without modifying too much else?
Thanks, and thanks for ioGui2!
dink-puller is offline   Reply With Quote
Old 10-28-2004, 04:02 PM   #2
ADDiCT
Senior Member
FlashFXP Beta Tester
ioFTPD Scripter
 
Join Date: Aug 2003
Posts: 517
Default

%(clientip) is indeed the client's hostname, will be fixed in next version, cookies will be %(clienthost) and %(clientip)

performing multiple ftp commands in one menu item isn't possible at the moment, but u can do a little workaround through settings.ini:
enter in a texteditor
menu_activity = kick/ban %(cid)@%(ipaddr) | $ftp SITE ADDBAN %(ipaddr)x$ftp site kill %(cid)
now open settings.ini in a hexeditor, and replace the x with the hexadecimal value 0A (= '\n' = newline)
ioGui2 will send the entire string as a single command, ioFTPD will split the string at the position of the newline, performing both commands.
ADDiCT is offline   Reply With Quote
Old 10-28-2004, 10:43 PM   #3
dink-puller
Member
ioFTPD Foundation User
 
dink-puller's Avatar
 
Join Date: Sep 2004
Posts: 58
Default

Veeeery tricky!! <grin>
Now my only problem is the hostname/IP thing, since unfortunately all the ban scripts I've seen on the site use the IP and not the hostname. How can I return the IP? Or is that not possible until the next version because there are a limited number of cookies coded into the .exe? 8{
Thanks for your replies.
dink-puller is offline   Reply With Quote
Old 10-29-2004, 11:19 AM   #4
ADDiCT
Senior Member
FlashFXP Beta Tester
ioFTPD Scripter
 
Join Date: Aug 2003
Posts: 517
Default

try this
ADDiCT is offline   Reply With Quote
Old 10-30-2004, 12:32 AM   #5
durulink
Senior Member
 
Join Date: Mar 2003
Posts: 102
Default

THX (--)(__)
durulink is offline   Reply With Quote
Old 10-30-2004, 03:16 AM   #6
Devianced
Member
 
Join Date: Sep 2004
Posts: 37
Default

Rear ADDiCT,
thank you first times for your singular ioGui 2,0,6: -)
I bad still another function, would be very nice if you this go around to add could: In menu "activity" IP ban function

for example: ban IP <111.111.111.111> for <X> minutes, hours...
Would be very grateful if you this function immediately add could.

thanks :banana:
Devianced is offline   Reply With Quote
Old 10-30-2004, 05:15 AM   #7
ADDiCT
Senior Member
FlashFXP Beta Tester
ioFTPD Scripter
 
Join Date: Aug 2003
Posts: 517
Default

ioFTPD doesn't have a built-in command to add an IP to the ban list, only to view the banlist (SITE BANS LIST) and to remove a banned ip (SITE BANS REMOVE 10.0.0.1)
This means, if u want to "manage" a list of banned ip's, u will need an external script anyway. I don't see any reason why i should implement this in ioGui, if there already is such a script.

Install that script, and edit settings.ini
menu_activity = Ban ip %(clientip) | SITE ADDBAN %(clientip)
ADDiCT is offline   Reply With Quote
Old 10-30-2004, 07:17 AM   #8
dink-puller
Member
ioFTPD Foundation User
 
dink-puller's Avatar
 
Join Date: Sep 2004
Posts: 58
Default

AWESOME!! Thank you so MUCH!!
dink-puller is offline   Reply With Quote
Old 01-25-2005, 08:24 AM   #9
dink-puller
Member
ioFTPD Foundation User
 
dink-puller's Avatar
 
Join Date: Sep 2004
Posts: 58
Default

I am still trying to perform multiple commands with a single click in ioGUI, and I gave up trying to pipe commands, or use a hex editor as you suggested. Now I am trying to use a batch script instead like this, hoping the parameters are passed to the bat:

menu_activity = Kick-Ban %(user) | $ftp SITE KICKBAN %(clientip) %(cid)

in [FTP_Custom_Commands]
KICKBAN = %EXEC ..\scripts\KickBan\KickBan.bat
ADDBAN = TCL ..\scripts\ioB\ioB.tcl addban


and my kickban.bat
@echo off
echo Banning %1(clientIP) and killing %2(cid)
echo !ADDBAN %1(clientIP) somereason
echo !kill %2(cid)
exit 0

it does return the echoed text, and "command successful", but nothing happens, maybe because I am not passing the parameters correctly? What am I doing wrong?
dink-puller is offline   Reply With Quote
Reply

Tags
$ftp, %ipaddr, add, commands, site

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
keep CHMOD attributes in copied folder jbr General Discussion 1 01-26-2005 04:39 PM


All times are GMT -5. The time now is 11:25 AM.

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