Re: Can wget handle this scenario?
Tomislav Goles [EMAIL PROTECTED] writes: Now I need to add the twist where username account info resides on another machine (i.e. machine2 which by the way is on the same network as machine1) So I need to do something like the following: $ wget ftp://username:[EMAIL PROTECTED]@machine1.com/file.txt which is of course not the syntax wget understands. Use: $ wget ftp://username:[EMAIL PROTECTED]/file.txt However, this will not work on Wget 1.8.1 due to a bug in handling URL-encoded passwords. You can remedy that with this patch: --- wget-1.8.1.orig/src/url.c +++ wget-1.8.1/src/url.c @@ -528,6 +528,11 @@ memcpy (*user, str, len); (*user)[len] = '\0'; + if (*user) +decode_string (*user); + if (*passwd) +decode_string (*passwd); + return 1; } I plan to implement this behavior automagically when you set the FTP proxy to ftp://machine1.com/.
Can wget handle this scenario?
Hi, I have been happily using wget to handle automatic ftp download but now have a situation which I am not sure whether wget can handle. This is the type of synax that I have been using without any problems: $ wget ftp://username:[EMAIL PROTECTED]/file.txt Now I need to add the twist where username account info resides on another machine (i.e. machine2 which by the way is on the same network as machine1) So I need to do something like the following: $ wget ftp://username:[EMAIL PROTECTED]@machine1.com/file.txt which is of course not the syntax wget understands. But perhaps there are some wget flags or other wget magic I am not aware of (while looking at the 'wget --help') output that allows for this? I can do an interactive ftp session which allows me to solve the situation in the following way: $ ftp machine2.com ftp username: username@machine1 ftp password: passwd ftp The above sequence gets me in without problem. But I can't figure out whether there is some way to automate this (without resorting to writing expect script). I would really prefer to do this with either wget, ftp, pavuk, or curl but I don't know whether any of those clients can do this. Any info on this would be most helpfull. Please e-mail me with any bright ideas as I am not subscribed to the wget lists. Thanks, Tomislav Goles [EMAIL PROTECTED]