octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FTP objects


From: Judd Storrs
Subject: Re: FTP objects
Date: Mon, 30 Nov 2009 19:38:41 -0500

>> | Another question is should I store the password in the FTP object? If I
>> | want to be able to save the FTP objects to a file and have them work
>> | when reloaded, then this is needed. However, it can represent a security
>> | risk, though not much of a one as the password is stored in the octave
>> | history when the handle was first created. Should I care?
>>
>> What does Matlab do?  Should we try to make it possible for someone to
>> load an ftp object in Octave that was saved in a Matlab session?
>>
> I no longer have access to octave and so I don't know.. What does matlab
> give for
>
> fp = ftp('ftp.gnu.org');
> get(fp)

get(fp) doesn't work. I think matlab is storing the password (2007b)

I setup a local ftp server for testing (i.e. it will only work for me,
the firewalls won't let outsiders in).

hostname: cuneus.msbb.uc.edu
username: ftpuser
password: 12345

If I start matlab and run

fp = ftp('cuneus.msbb.uc.edu','ftpuser','12345') ;
save ftp.mat fp
dir(fp)

I get the expected file listing. If I then quit matlab and restart

load ftp.mat
dir(fp)

works and gives the same file listing.

> I don't know if matlab provides the get accessor function for FTP
> objects and so this might just fail. The only other way to see if matlab
> stores the username/password is to read the ftp.m constructor and maybe
> modify the display method.

Tab completion in the Matlab command window indicates that fp.password exists.

>> struct(fp)

ans =

      jobject: [1x1 org.apache.commons.net.ftp.FTPClient]
         host: 'cuneus.msbb.uc.edu'
         port: 21
     username: 'ftpuser'
     password: '12345'
    remotePwd: [1x1 java.lang.StringBuffer]
         type: [1x1 java.lang.StringBuffer]


So it looks like the password is saved in plaintext. I'm attaching
ftp.mat. It wouldn't load in octave because I didn't have a matching
constructor. I can't remember how to get around that but I think there
is a way.


--judd

Attachment: ftp.mat
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]