Utility to execute ELF binary directly from stdin pipe. It is useful to run binary via SSH without copy or install it on remote systems.
Run binary via ssh:
$ cat build-1234 | ssh user@host 'elfexec --test=integration --env=production'
Decode base64 encoded binary and run it directly:
$ echo 'IyEvYmluL3NoCmVjaG8gIkhlbGxvISIK' | base64 -d | elfexec
Compile source code and run it without temporary files:
$ echo '
#include <unistd.h>
int main(int argc, char* argv[])
{
write(STDOUT_FILENO, "Hello!\n", 7);
return 0;
}
' | cc -xc - -o /dev/stdout | elfexec
Require Linux 3.17 or higher:
- Precompiled static binaries built with system libc (glibc) and musl libc for x64 and i386
- From source code:
$ git clone https://github.com/abbat/elfexec.git
$ make && sudo make install
To compile with own flags use USER_CFLAGS
and USER_LDFLAGS
variables. For example for i386 static binary with musl libc:
$ CC=musl-gcc32 USER_CFLAGS=-m32 USER_LDFLAGS='-m32 -static -Wl,-melf_i386' make
elfexec [options]
Where options
is executed binary options.
Executed binary exit code or 1
if self failed.
- Translate this document or man page to your native language;
- Proofreading README.md or man page with your native language;
- Share, Like, RT to your friends;
- Send PRs if you are developer.