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

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

Thread Next
From:
Jason Kendall
Date:
December 8, 2002 21:10
Subject:
How does the Perl Module called "NET:ftp" logon to an FTP server?
Message ID:
005a01c29f5d$07b4cea0$97c352a6@kendall4gp55u0
Hello.

This is my first email to beginners@perl.org.

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
open myfirewallproxy.mylan.com
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
bye
mark

.....Now however, since the upgrade of this firewall...this no longer works...it's like the newer version of the firewall
will only let me logon via the command line...it'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 functionality...so to
finally get to the point.....

How is it that this perl script ..used with the NET::ftp module...is 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?...is 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


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About