bug-wget
[Top][All Lists]
Advanced

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

Re: [Bug-wget] Any explanation for the '-nc' returned value?


From: Yuxi Hao
Subject: Re: [Bug-wget] Any explanation for the '-nc' returned value?
Date: Tue, 31 Jul 2018 19:03:26 +0800

Forgot to say, I use this in scripts to update some software. There is already 
the 'old' file existing.
If the first try fails, I certainly should do as you say.
If it returns failed for 'preventing do anything when local file exists', it is 
weird. That is what we want.
I mean it should return succeed. It worked as we specified: don't overwrite nor 
download in to a new file. (RCE?)
I am not going to change the behavior of '-nc', but just confused with the 
return value.

Thanks for your reply and patience Tim! I can just change it in my own 
compilation :p

Best Regards,
YX Hao

-----Original Message-----
From: Tim Rühsen
To: Yuxi Hao; 'Dale R. Worley'
Cc: address@hidden
Subject: Re: [Bug-wget] Any explanation for the '-nc' returned value?

On 30.07.2018 16:44, Yuxi Hao wrote:
> Let's take an example in practice.
> When there is a bad network connection, I try wget with '-nc' directly first, 
> if it fails, then I'll try it with proxy. If it says "File * already there ; 
> not retrieving.", and returns 1 as described (error occurred, failed), that 
> is so weird!

After the first try failed, you should explicitly move/remove the file out of 
the way. That is not weird, it's a safety feature. It might save you when 
having a typo or when an URL is retrieved that you itself can't trust. You 
could easily overwrite files in your home directory, e.g.
.profile or .bashrc. That is easily used as an Remote Code Execution (RCE).

So no way we "fix" this ;-)






reply via email to

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