4 ms·
It's been a while but I thought the real reason shars existed was because they were 7 bit clean, meaning they could be traded on usenet (or ftp in ascii mode) w
by __david__ 11y ago
It's been a while but I thought the real reason shars existed was because they were 7 bit clean, meaning they could be traded on usenet (or ftp in ascii mode) without needing any external program like uudecode…
> …only they're shell scripts so you have to execute them and then they can potentially execute arbitrary code unless you read through them very closely and actually understand them.
> Yes, people actually made these. Yes, people actually ran these.
Running something you downloaded is how every installer works. Self extracting zips are still a thing, too. At least with shars you could read the source.
Oh yeah, even today people still do `curl http://example.com http://example.com | bash` (If someone were truly evil they'd make the first download from an IP clean and inject bad code into the second. That would catch all the people who `curl | less` first and then run it again piped to bash). :-)
- bediger4000 11y agoAll you needed to undo a shar (shell archive) was a fairly common Bourne shell. We had uuencode to make things 7-bit clean. Some programs to make shar files uuencoded the archived files, but some didn't. "shar" files existed because "tar" wasn't particularly standardized. As late as 1990, SGI Irix "tar" did bytes in reverse order from SunOS "tar". You had to convert bytes to untar a SunOS archive on Irix.
- JadeNB 11y ago> That would catch all the people who `curl | less` first and then run it again piped to bash Are many people security-conscious enough to do the former but security-unconscious enough to do the latter? I would assume that one would do `curl http://example.com http://example.com > evilscript; vim evilscript` and then `bash evilscript` if necessary.