bugGNU Wget - Bugs: bug #51239, Option for fileviewer

 
 

bug #51239: Option for fileviewer

Submitter:  Peter Passchier <pepa65>
Submitted:  Thu 15 Jun 2017 06:58:38 AM UTC
   
 
Category:  Feature Request Severity:  3 - Normal
Priority:  5 - Normal Status:  None
Privacy:  Public Assigned to:  None
Originator Name:  pepa65 Open/Closed:  Open
Release:  None Operating System:  GNU/Linux
Reproducibility:  Every Time Fixed Release:  None
Planned Release:  None Regression:  None
Work Required:  None Patch Included:  No
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 15 Jun 2017 09:27:05 AM UTC, comment #4: 

Wow, thank you so much! And vipe also allows one to specify an editor with commandline switches. The Abort option is less clear, but it should work. Not sure how often moreutils is part of a default install, but this is probably as good as it gets for this use case...

Peter Passchier <pepa65>
Thu 15 Jun 2017 08:27:12 AM UTC, comment #3: 

Right. There also is 'vipe' from package moreutils - that should be available on most distributions.

Tim Ruehsen <rockdaboot>
Group administrator
Thu 15 Jun 2017 07:49:48 AM UTC, comment #2: 

Thanks, that would indeed be such a utility. And one can edit it too..! Of course, it wouldn't be part of any default installation... Instead of instructing people how to download and install this, you might as well instruct them to:
wget -q url.to/script
less script
# and if it passes muster:
chmod +x script
./script

I think in binary form (compiled in) it could be smaller than this perl script.

Peter Passchier <pepa65>
Thu 15 Jun 2017 07:20:04 AM UTC, comment #1: 

Maybe you are looking for something like http://www.vim.org/scripts/script.php?script_id=2769


Tim Ruehsen <rockdaboot>
Group administrator
Thu 15 Jun 2017 06:58:38 AM UTC, original submission:  

This request has to do with about piping wget-downloaded scripts into bash, (or some other interpreter) often to install programs or do other tasks. Some say you should never do this (always download and view the script before executing it manually), but the practice remains because it is so convenient. If only it were safe..!

Background:
https://www.idontplaydarts.com/2016/04/detecting-curl-pipe-bash-server-side/
https://sysdig.com/blog/friends-dont-let-friends-curl-bash/

My feature request is to include a tiny text viewer with the wget binary that can be activated by a command line switch, that allows users to view what has been downloaded before piping it on. Ctrl-C would abort, and some other key would signify it's OK to continue.

wget -qO- --viewpipe https://url.to/script |bash
(maybe --viewpipe would imply output to stdout?)

I understand your first reaction would be feature creep, but it would make the world a safer place for people engaging in piping wget into bash. The alternate option would be to have a little application in between wget and bash, except that application also doesn't exist, and it most likely would not be installed, and it's less convenient overall. The added size would be really minimal.

Wouldn't that be a great added value??
Peter

Peter Passchier <pepa65>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rockdaboot (Posted a comment)
  • -email is unavailable- added by pepa65 (Submitted the item)
  •  

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code