Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What happens if you try to, say, send that executable as an e-mail attachment?


Well, first of all, you don't do that, because what email server anywhere is going to accept mail with an executable attached, without thinking it's some kind of attack?

But in general, you put it in an archive.

(Yes, that's inconvenient; but when you're coming from an OS where you already had to do that — e.g. macOS 9, where you had to use StuffIt Expander to distribute executables in order to ensure they retain their resource forks — switching from StuffIt to zip was a wash.)

These OSes (NeXTStep, macOS) usually integrate some support for mounting disk images, though, and so executables packaged for distribution are usually packaged by putting them in a disk-image. To further decrease the friction (i.e. avoid having to say "copy this thing out of this directory into your /Applications dir", they usually make it so that if you run the app from inside the image, it copies itself to your /Applications dir, and then relaunches from there. Sometimes it even unmounts the image when it does that.

Given that most people get programs from websites, though, there are also special techniques built into web browsers to make downloading executables on these OSes more transparent and less requiring the abstraction of a disk-image. E.g. Apple's https://en.wikipedia.org/wiki/.XIP format, where any .XIP downloaded in Safari will be automatically+transparently integrity-verified and unpacked, with the result being that it seems like you just "downloaded a folder" somehow.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: