i've found this script on the forum and to test i am trying to make it just display the ftp reply in a channel... unfortunately it doesn't seem to be working.
Code: Select all
bind pub -|- !monty ftpcheck
proc ftpcheck {n u h t a} {
putserv "PRIVMSG #turbo-test :users working"
set host "ip of site"
set port "port of site"
set user "user"
set pass "pass"
catch {socket $host $port} sock
if {[string match -nocase "sock?" $sock]} {
puts $sock "USER $user"
puts $sock "PASS $pass"
puts $sock "site monthdn 3"
set i 0
while {![eof $sock]} {
flush $sock
gets $sock line
if {[string match -nocase 200 [lindex $line 0]]} {
putserv "#Turbo-test $line"
}
if $i==100 { close $sock }
incr i 1
}
} else {
putserv "PRIVMSG #Turbo-test :Error No Route Host."
return 0
}
}
** EDIT ** i get the no route to host reply now so something wrong with the socket syntax?
i've logged into the ftp manually from the shell and it works... the reply to site monthdn 3 looks a lil like this
Code: Select all
200- __ _______ _ __________ ______ ____ _ ___ __
200- / |/ / __ \/ | / /_ __/ / / / __ \/ __ \ | / / | / /
200- / /|_/ / / / / |/ / / / / /_/ / / / / / / / | /| / / |/ /
200- / / / / /_/ / /| / / / / __ / /_/ / /_/ /| |/ |/ / /| /
200- /_/ /_/\____/_/ |_/ /_/ /_/ /_/_____/\____/ |__/|__/_/ |_/
200-
200- ## User Tagline Files Amount Speed
200- [ 1] user1 no tagline 6395 242.6GB - k/s
200- [ 2] user2 no tagline 5908 221.1GB 7.4GB/s
200- [ 3] user3 no tagline 4167 198.8GB - k/s
200
regards
Turbo