We have moved to https://codeberg.org/KOLANICH-libs/isExecutable.cpp, grab new versions there.
Under the disguise of "better security" Micro$oft-owned GitHub has discriminated users of 1FA passwords while having commercial interest in success and wide adoption of FIDO 1FA specifications and Windows Hello implementation which it promotes as a replacement for passwords. It will result in dire consequencies and is competely inacceptable, read why.
If you don't want to participate in harming yourself, it is recommended to follow the lead and migrate somewhere away of GitHub and Micro$oft. Here is the list of alternatives and rationales to do it. If they delete the discussion, there are certain well-known places where you can get a copy of it. Read why you should also leave GitHub.
A library for checking if a file is executable.
Does:
- parses headers of
- ELF
- PE
- Mach-O
- reports
- file class
- ordinary
- executable
- shared library
- shell script
- whether PIC used (according to headers)
- bitness: 32 or 64
- access rights - whether
x
bit is set
- file class
- POSIX platforms:
- checks shebang
- Win32
- if a file name matches the one of shell scripts
- provides functions to convert machine-readable reports into strings, both human-readable and machine-readable
- JSON
- human-readable 1 char space-separated "brief" format
- human-readable space-separated "verbose" format
- provides C wrappers to be used from the languages other than C++
Doesn't do:
- doesn't parse the format fully, only some few checks on headers are done
- big-endian machines are out of scope, everything is assummed to be little endian
- doesn't check machine code
- doesn't check whether content is really a shell script
- doesn't check if we can really run that file
Packaging with CPack is implemented, you can generate an installable package for Debian and RPM-based distros. All the dependencies are assummed to be installed the same way.
See the example in bin
directory.
- https://github.com/fitzgen/is_executable - a lib doing the similar thing in Rust. Doesn't parse ELF.