develooper Front page | perl.beginners | Postings from December 2002

How does the Perl Module called "NET:ftp" logon to an FTP server?

Thread Next
Jason Kendall
December 8, 2002 21:10
How does the Perl Module called "NET:ftp" logon to an FTP server?
Message ID:

This is my first email to

Please pardon the fact that this question is very vague...and long....and any help is appreciated...thanks in advance...

I have some Unix (korn shell) ftp scripts that automatically logon to remote ftp servers and get and put files.
These scripts...up to this point...have worked great...but now I have an annoying problem...

The LAN that I'm on has recently upgraded to a newer version (not sure what version) of the "Checkpoint" firewall
software. Getting past the firewall to do ftps has not been an issue until this upgrade. In the past, my ftp scripts
would do something like this...

ftp -n -v << mark
user remote_ftp_site_user_name@my_firewall_user_name@remote_ftp_site_ip_address
pass remote_ftp_site_password@my_firewall_password
get my_file.txt

.....Now however, since the upgrade of this firewall...this no longer's like the newer version of the firewall
will only let me logon via the command's like it wants/ requires me to type in the user name...then hit a carriage
return, then type in the password, then I'm logged on....

....Someone suggested to me that in order to circumvent this problem that I use the "NET::ftp" perl module...they provided me
with a template perl script to use...I used it and it works fine....but here is my problem...the perl script they provided does
not do all the stuff that my korn shell script does in terms of checking for successful file transfer, checking for correct date
of file being pulled down , checking for correct number of records in the file etc...etc...etc...and not being a perl programmer,
I don't really want to have to convert all these korn shell ftp scripts to perl scripts that include the same to
finally get to the point.....

How is it that this perl script ..used with the NET::ftp able to logon fine to the remote ftp server...but the korn shell
script (since the firewall upgrade) can not?...what can it be doing behind the scenes that's so different? it somehow
passing the remote ftp server a newline character that my korn shell script does not ??

Any help is appreciated...there must be someone out there that knows what NET::ftp is doing behind the scences...I got
a .netrc file to work for the ftp w/ the korn shell script..but due to security reasons , I don't think a .netrc file on a Unix box
is a good idea.

Thanks ...Any help much appreciated !

Jason Kendall

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About