Another thought is to use magic ala the “file” command or the corresponding library, libmagic, with MAGIC_MIME_TYPE. I would rather have an exclude list if all executables and scripts were included by default. Executables approximately defined by application/x-executable, application/x-sharedlib, application/x-archive, application/x-coff, application/x-coffexec, application/x-dosexec, application/javascript, text/x-shellscript, text/x-awk, text/x-gawk, text/x-nawk, text/x-python
-
This reply was modified 6 years, 7 months ago by aronrubin.