Show HN: Run unknown shell script with a line-by-line confirmation prompt
21–30 of 86 posts
Re: Show HN: Run unknown shell script with a line-by-line confirmation prompt
#22Possibly relevant, the bash restricted shell (bash -r): https://www.gnu.org/software/bash/manual/html_node/The-Restr...
Can you provide example of a scenario where this restricted shell is useful?
Re: Show HN: Run unknown shell script with a line-by-line confirmation prompt
#23If you are considering using this tool, then I would suggest that you seriously reevaluate your life choices. You should never run shell scripts without reading them first, ever. That is so irresponsible. Validating shell scripts will make you a more competent and informed worker. Tools like this breed incompetence, and encourage carelessness.
Re: Show HN: Run unknown shell script with a line-by-line confirmation prompt
#24> Useful for running unknown scripts Or just, you know, read them before you run them.
One complication is that websites can hijack your copy buffer, and the text you paste isn't the text you copied. I avoid this by pasting into an editor, not directly into a shell.
Re: Show HN: Run unknown shell script with a line-by-line confirmation prompt
#25If you are considering using this tool, then I would suggest that you seriously reevaluate your life choices. You should never run shell scripts without reading them first, ever. That is so irresponsible. Validating shell scripts will make you a more competent and informed worker. Tools like this breed incompetence, and encourage carelessness.
I want this to run my own shell scripts. I have a bunch of scripts that are halfway between "documentation" and "automation"; mostly the record of the last time I did X. Add a prompt to eval a command or two or change variables that are hard coded, and it's ipython for shell.
That's really the only use case for this tool that I could get behind, and I commend you for your diligence.
Re: Show HN: Run unknown shell script with a line-by-line confirmation prompt
#26If you are considering using this tool, then I would suggest that you seriously reevaluate your life choices. You should never run shell scripts without reading them first, ever. That is so irresponsible. Validating shell scripts will make you a more competent and informed worker. Tools like this breed incompetence, and encourage carelessness.
Re: Show HN: Run unknown shell script with a line-by-line confirmation prompt
#27It’s probably possible to craft a script that looks innocuous line-by-line, but does something malicious as a whole.
Indeed. If the person does not understand why/what is encoded by things like xxd or base64 or using tr to swap/filter characters, then one should hopefully pull the eject lever. When in doubt, one can sandbox scripts and see what they are in effect trying to do.
Re: Show HN: Run unknown shell script with a line-by-line confirmation prompt
#28Can I use it to run itself?
Re: Show HN: Run unknown shell script with a line-by-line confirmation prompt
#29If you are considering using this tool, then I would suggest that you seriously reevaluate your life choices. You should never run shell scripts without reading them first, ever. That is so irresponsible. Validating shell scripts will make you a more competent and informed worker. Tools like this breed incompetence, and encourage carelessness.
Do you run on Gentoo? and presumably read the millions of lines of code your machine is running on?
People have been downloading and running executables almost pretty much as as the internet has been around... and the world is still going 'round.
Re: Show HN: Run unknown shell script with a line-by-line confirmation prompt
#30If you are considering using this tool, then I would suggest that you seriously reevaluate your life choices. You should never run shell scripts without reading them first, ever. That is so irresponsible. Validating shell scripts will make you a more competent and informed worker. Tools like this breed incompetence, and encourage carelessness.
> You should never run shell scripts without reading them first, ever. That is so irresponsible. Do you run on Gentoo? and presumably read the millions of lines of code your machine is running on? People have been downloading and running executables almost pretty much as as the internet has been around... and the world is still going 'round.