Show HN: Run unknown shell script with a line-by-line confirmation prompt
1–10 of 86 posts
Re: Show HN: Run unknown shell script with a line-by-line confirmation prompt
#2You can also do this with bashdb which is possibly also a more robust solution.
Re: Show HN: Run unknown shell script with a line-by-line confirmation prompt
#3You can also do this with bashdb which is possibly also a more robust solution.
Why isn't this solution robust? Seems like using the DEBUG trap would be very robust.
Re: Show HN: Run unknown shell script with a line-by-line confirmation prompt
#4> Useful for running unknown scripts
Or just, you know, read them before you run them.
Re: Show HN: Run unknown shell script with a line-by-line confirmation prompt
#5 accept_whatsapp_terms_and_conditions="true"
Run command? [Y/n]Re: Show HN: Run unknown shell script with a line-by-line confirmation prompt
#6Can I use it to run itself?
Re: Show HN: Run unknown shell script with a line-by-line confirmation prompt
#7Can I use it to run itself?
Not without some modifications, which I did not make because the complexity would get crazy with shell scripting
Re: Show HN: Run unknown shell script with a line-by-line confirmation prompt
#8Possibly relevant, the bash restricted shell (bash -r):
https://www.gnu.org/software/bash/manual/html_node/The-Restr...
Re: Show HN: Run unknown shell script with a line-by-line confirmation prompt
#9It’s probably possible to craft a script that looks innocuous line-by-line, but does something malicious as a whole.
Re: Show HN: Run unknown shell script with a line-by-line confirmation prompt
#10It’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.