#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    179
    Rep Power
    15

    Net::ftp security


    Hi all

    When creating an Net::ftp object,

    my $username = 'xxxxx';
    my $password = 'yyyyy';

    my $ftp = Net::FTP->new('my.ftpserver.com', Debug => 0);
    my $ftp->login($username,$password);

    what security measures can be taken to hide (or to make it really inconvenient to access) the username and password? Thanks.
  2. #2
  3. No Profile Picture
    Senior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2002
    Location
    U.S. Mass
    Posts
    95
    Rep Power
    0
    You mean as far as someone getting to the source of the script? I don't think there is anything you can really do when it comes to how it's transmitted to the ftp site from Net::FTP..

    It only adds very little but I read my username and password from a txt file on the file system.. So you end up with something like:

    Code:
    my $ftppassfile = 'path/ftpuser.pass';
    my ($ftp_username,$ftp_password);
    open (FTPPASSFILE, "$ftppassfile") or die "Couldn't open $ftppassfile: $!\n";
    while (<FTPPASSFILE>) {
         ($ftp_username,$ftp_password) = split;
         }
    
    my $ftp_conn = Net::FTP->new('my.ftpserver.com', Debug => 0); 
    my $ftp_conn->login($ftp_username,$ftp_password);

    -Chris
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    179
    Rep Power
    15
    You got what I'm asking.

    I didn't think there were any good options in hiding the information, besides keeping users off of the system.

    Just want to find out what others do concerning this sort of security. Thanks.

IMN logo majestic logo threadwatch logo seochat tools logo