Re: [PLUG] Using curl for file transfer

2021-02-11 Thread Michael Barnes
On Tue, Feb 9, 2021 at 12:08 PM Michael Barnes 
wrote:

> I use a program that uses curl to automate ftp file transfers. The problem
> I have run into is the username for the ftp account is an email address (
> u...@host.com). When I enter the information in the window to edit the
> downloads, I put in the host information, then in the user box, I put
> u...@host.com. Unfortunately, the download failed. It was suggested to
> escape the @, so I tried user\@host.com, but the program did not accept
> the \. When I typed it, it just didn't show up.
>
> So, any curl experts out there can help me put the @ in the username?
>
> Thanks,
> Michael
>
>
After some more testing, I think I found the problem. It wasn't in the
username after all.  The host is using FTP over TLS, so I need to use ftps.
That gives me a command line of

curl -u u...@host.com:password ftps://hostname.com/path/file.mp3

which eventually times out with the error "curl: (7) Failed connect to
hostname.com:990; Connection timed out"

I then discovered that there are two modes of FTP over TLS. There is
explicit using port 21 and implicit on port 990. After testing with
Filezilla, I find that explicit works and implicit does not.

Now I need a way to get curl to use port 21 instead of 990.

Thanks for any ideas.

Michael
___
PLUG: https://pdxlinux.org
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Using curl for file transfer

2021-02-09 Thread Tomas Kuchta
Is the GUI opensource? Could you modify the code to properly handle @ in
the user name?

This does not look like curl problem - in my experience curl command line
accepts @ in --user without issues.

I am sorry, I was hoping that there is curl command line involved somehow.

-T

On Tue, Feb 9, 2021, 22:41 Michael Barnes  wrote:

> On Tue, Feb 9, 2021 at 7:28 PM Tomas Kuchta 
> wrote:
>
> > On Tue, Feb 9, 2021, 15:41 Ken Stephens 
> > wrote:
> >
> > > Single quotes around the email addess?
> > >
> > > .
> >
> >
> > I think that there may be more to the problem description.
> >
> > Curl is command line tool OP mentions box/window - that would suggest
> some
> > GUI contraption where escaping or quoting will not work as in shell.
> >
> > Perhaps, we need to see the problematic command line (with changed
> > username/hostname of course).
> >
> > -T
> >
> > >
> >
>
> The program is for radio station automation. It has a number of gui modules
> for different things. One of these downloads audio files from program
> providers for later play on the air. The module uses the cURL Library for
> the file transfer portion. When you program each download, you put in the
> various information items of host, filename, username, password, download
> time, etc. Does that clarification help?
>
> Michael
> ___
> PLUG: https://pdxlinux.org
> PLUG mailing list
> PLUG@pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>
___
PLUG: https://pdxlinux.org
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Using curl for file transfer

2021-02-09 Thread Michael Barnes
On Tue, Feb 9, 2021 at 7:28 PM Tomas Kuchta 
wrote:

> On Tue, Feb 9, 2021, 15:41 Ken Stephens 
> wrote:
>
> > Single quotes around the email addess?
> >
> > .
>
>
> I think that there may be more to the problem description.
>
> Curl is command line tool OP mentions box/window - that would suggest some
> GUI contraption where escaping or quoting will not work as in shell.
>
> Perhaps, we need to see the problematic command line (with changed
> username/hostname of course).
>
> -T
>
> >
>

The program is for radio station automation. It has a number of gui modules
for different things. One of these downloads audio files from program
providers for later play on the air. The module uses the cURL Library for
the file transfer portion. When you program each download, you put in the
various information items of host, filename, username, password, download
time, etc. Does that clarification help?

Michael
___
PLUG: https://pdxlinux.org
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Using curl for file transfer

2021-02-09 Thread Tomas Kuchta
On Tue, Feb 9, 2021, 15:41 Ken Stephens  wrote:

> Single quotes around the email addess?
>
> .


I think that there may be more to the problem description.

Curl is command line tool OP mentions box/window - that would suggest some
GUI contraption where escaping or quoting will not work as in shell.

Perhaps, we need to see the problematic command line (with changed
username/hostname of course).

-T

>
___
PLUG: https://pdxlinux.org
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Using curl for file transfer

2021-02-09 Thread Ken Stephens
Single quotes around the email addess?

On Tue, Feb 9, 2021 at 12:09 PM Michael Barnes 
wrote:

> I use a program that uses curl to automate ftp file transfers. The problem
> I have run into is the username for the ftp account is an email address (
> u...@host.com). When I enter the information in the window to edit the
> downloads, I put in the host information, then in the user box, I put
> u...@host.com. Unfortunately, the download failed. It was suggested to
> escape the @, so I tried user\@host.com, but the program did not accept
> the
> \. When I typed it, it just didn't show up.
>
> So, any curl experts out there can help me put the @ in the username?
>
> Thanks,
> Michael
> ___
> PLUG: https://pdxlinux.org
> PLUG mailing list
> PLUG@pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>
___
PLUG: https://pdxlinux.org
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Using curl for file transfer

2021-02-09 Thread Bill Barry
On Tue, Feb 9, 2021 at 2:09 PM Michael Barnes  wrote:
>
> I use a program that uses curl to automate ftp file transfers. The problem
> I have run into is the username for the ftp account is an email address (
> u...@host.com). When I enter the information in the window to edit the
> downloads, I put in the host information, then in the user box, I put
> u...@host.com. Unfortunately, the download failed. It was suggested to
> escape the @, so I tried user\@host.com, but the program did not accept the
> \. When I typed it, it just didn't show up.
>
> So, any curl experts out there can help me put the @ in the username?
>
Not a curl expert, but this
https://stackoverflow.com/questions/32122586/curl-escape-single-quote/39802572
suggests you also have to escape the \ also as in '\'@
ymmv
Bill Barry
___
PLUG: https://pdxlinux.org
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug