This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

FTP script

Old posts that have not been replied to for several years.
Locked
w
woffer

Post by woffer »

Hmm... is it possible to make the bot to check if a FTP is online or not? .. exec ftp if able to login return 1 else return 0
but in real code ? =)

<font size=-1>[ This Message was edited by: woffer on 2001-11-13 12:43 ]</font>
W
Wcc
Master
Posts: 278
Joined: Sun Oct 28, 2001 8:00 pm
Location: USA
Contact:

Post by Wcc »

It would be easy to see if the ftp accepts connections on a certian port, do you actually need it to LOGIN?
w
woffer

Post by woffer »

I need it to login to see if the owner hasen't changed password or anything. =)
Mission Impossible 4 =)
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

If your shell has the command "ncftpls" then it's really easy. "ncftpls" is a program that lets you do a directory listing of an ftp site. You specify host, port, username, password, and it returns a code depending how things went. Read "man ncftpls" for info on the return code (basically, 0 = success, non-zero = failure).

Code: Select all

% puts [catch "exec ncftpls ftp://ftp.eggheads.org"]
0
% puts [catch "exec ncftpls ftp://sheep.are.good.com"]
1
%
With a little work, such as getting the arguments for username/password right, ncftpls should be able to help you out a lot.
w
woffer

Post by woffer »

Thanks man!
ncftpls comes as standard in slack8 so i had it =)

one more time: Thanks! =)
b
blaster^

Post by blaster^ »

it exists a FTP package tcl extension or if your tcl version is recent, it is now included in the tcllib
anyway see
http://home.t-online.de/home/Steffen.Tr ... indexe.htm
Locked