in reply to FTP & MD5

...leaving public key encryption as the only solution I can't eliminate as being too insecure - but maybe others have bright ideas?

Replies are listed 'Best First'.
Re^2: FTP & MD5
by bofh_of_oz (Hermit) on Jun 21, 2005 at 14:12 UTC
    Yeah, SFTP would work nice and it is supported by Perl... I wouldn't suggested using FTP and SSL though as I've spent a few weeks trying to figure out how do to that in Perl and so far it doesn't want to work properly...

    --------------------------------
    An idea is not responsible for the people who believe in it...

      I wouldn't suggested using FTP and SSL though as I've spent a few weeks trying to figure out how do to that in Perl and so far it doesn't want to work properly...

      Some months ago I had the same problem, but I was not able to get Net::SFTP work. So I wrote my own module.
      Few days ago I released a module called Net::FTPSSL, which use IO::Socket::SSL and Net::SSLeay::Handle for connections. :D
      Its methods are similar to Net::FTP, so you can easily convert a script from Net::FTP to Net::FTPSSL.
      If anyone wants give it a try, I'll be very happy! :D
      Cheers,
      Update:I didn't see Eyck post! :D
      ----------
      kral
      (I apologise for my english!)

        You didn't see my module either;), you know, the one that uses IO::Socket::SSL and Net::SSLeay::Handle for connections and used to be called Net::FTPSSL, but the name was struck down multiple times by module-authors ML:(

        I took a peek at your module, and it seems like it's better thought-out, I'm thinking about dropping mine and moving to supporting yours.

        I tried it, here's output:

        Your vendor has not defined SSLeay macro randomize at C:/Perl/site/lib +/IO/Socket /SSL.pm line 34 BEGIN failed--compilation aborted at C:/Perl/site/lib/IO/Socket/SSL.pm + line 35. Compilation failed in require at (eval 1) line 3. ...propagated at C:/Perl/lib/base.pm line 85. BEGIN failed--compilation aborted at C:/Perl/site/lib/Net/FTPSSL.pm li +ne 11. Compilation failed in require at test2.pl line 1. BEGIN failed--compilation aborted at test2.pl line 1.

        Any particular SSLeay/OpenSSL version I should use with it?

        --------------------------------
        An idea is not responsible for the people who believe in it...

Re^2: FTP & MD5
by Eyck (Priest) on Jun 22, 2005 at 06:45 UTC
    There's no problem with transferring files securely using FTP, look at Net::Lite::FTP and Net::FTPSSL,
    both support TLS-protected FTP servers (proftpd, wzdftp, pureftpd and few others support this)
      I tried your module for transfer, and it gives me a couple of errors... Would you be able to look at those?

      Here's the code:

      my $tlsftp=Net::Lite::FTP->new(); $tlsftp->open($ftphost, 2030); $tlsftp->user("$ftpuser"); $tlsftp->pass("$ftppass"); $tlsftp->cwd("$dir"); my @files=$tlsftp->nlst("$fname"); print "@files\n";

      Here's the output:

      OPEN.Received: 220 ftpssl.dstoutput.ca X2 WS_FTP Server 5.0.4 (3934600 +204) SRV Response: 220 ftpssl.dstoutput.ca X2 WS_FTP Server 5.0.4 (39346002 +04) RECV: 220 ftpssl.dstoutput.ca X2 WS_FTP Server 5.0.4 (3934600204) OPEN..Received: 220 ftpssl.dstoutput.ca X2 WS_FTP Server 5.0.4 (393460 +0204) Received: 234 SSL enabled and waiting for negotiation Prototype mismatch: sub Net::SSLeay::randomize (;$$) vs none at (eval +5) line 1. Sending: PBSZ 0 Prototype mismatch: sub Net::SSLeay::ssl_read_until ($;$$) vs none at +(eval 6) l ine 1. Damn! undefined response Sending: PROT P Damn! undefined response

      I suspect my SSLeay, but lack knowledge to successfully troubleshoot/fix the problem...

      More info on this: The script is compiled on WindowsXP, then I run perl2exe on it, then run the .EXE on Windows NT box. perl2exe is supposed to include all the necessary libraries tho...

      --------------------------------
      An idea is not responsible for the people who believe in it...

        Does it work on the station you're compiling it on?

        Tell you the truth as far as Win32 is concerned I only tested NT 4.0 and Win2k, and as far as 2exe, only par, and it worked ok.

        First look seems to suggest that your Net::SSLeay is not working properly.