5 ms·
I would think twice about executing bash code from people's profiles. Sure, the prior probability of trolls is pretty low on HN, and I know that your specific s
by MauranKilom 5y ago
I would think twice about executing bash code from people's profiles. Sure, the prior probability of trolls is pretty low on HN, and I know that your specific snippet is safe, but it's easy to get fooled, even if you think you know what you are doing. See https://superuser.com/questions/996795/how-and-why-is-this-string-of-text-a-fork-bomb https://superuser.com/questions/996795/how-and-why-is-this-s....
- mastazi 5y agoWhile I agree with you about executing snippets of unknown origin not being a good idea, I expect that the average HN user would at most need to copy the part in quotes, and they would be already familiar with the rest of that line.
- MauranKilom 5y ago> copy the part in quotes ...which would still get you pwned for the snippet in the question I linked. Again, I know that for someone reasonably familiar with base64 and bash it's obvious that the base64 example is indeed safe. Maybe you want to filter out people that don't have that level of familiarity (or aren't naive enough to execute bash code they don't fully understand). That's both very arbitrary and unnecessary though - HN is quite diverse. But of course, it's also up to everyone what they do or don't put in their profile.
- mastazi 5y agoI stand corrected, thanks for the link, from that one I followed this link which is even more interesting as it explains the process of creating that snippet: https://www.vidarholen.net/contents/blog/?p=766 https://www.vidarholen.net/contents/blog/?p=766
- nuker 5y ago> I would think twice about executing bash code from people's profiles Perl is better, safest language, write only