Hi,

I would like to use lftp to download files through HTTP using lftp's
pget feature. I need to authenticate so I did in a shell script :

#!/bin/bash

HOST=http://host:port
HPATH=/path/to/file

lftp -u <login>:<password> $HOST -e "pget $HPATH"

It works great if we expect the fact that everyone can see my login and
password using top or ps.

I was wondering if we could do something like that :

#!/bin/bash

HOST=http://host:port
HPATH=/path/to/file
export LFTP_USER=<login>
export LFTP_PASSWORD=<password>

lftp $HOST -e "pget $HPATH"

Where lftp would authenticate using the contents of LFTP_USER and
LFTP_PASSWORD environment variables.

Regards.

-- 
Sylvain Rabot <[email protected]>

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to