diff options
| author | stderr64 <stderr64@null.net> | 2026-08-02 21:30:47 +0300 |
|---|---|---|
| committer | stderr64 <stderr64@null.net> | 2026-08-02 21:30:47 +0300 |
| commit | 2e2d8c94e2355e6beae219cb3b7a0684ef1f1aa1 (patch) | |
| tree | 48017bda6679ff6f2ee7a661699f96ebbd3899ce /extract_decoded_executable/build.sh | |
| parent | 319f308b49786c9fcd3a77aa4f234df08eb2fc83 (diff) | |
| download | experiments-2e2d8c94e2355e6beae219cb3b7a0684ef1f1aa1.tar.gz experiments-2e2d8c94e2355e6beae219cb3b7a0684ef1f1aa1.tar.zst | |
Added code that extracts ELF binary stored in define value of the compiled binary
Diffstat (limited to 'extract_decoded_executable/build.sh')
| -rwxr-xr-x | extract_decoded_executable/build.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/extract_decoded_executable/build.sh b/extract_decoded_executable/build.sh new file mode 100755 index 0000000..6af8971 --- /dev/null +++ b/extract_decoded_executable/build.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +gcc -Wall -Werror -pedantic -O2 -mavx2 -march=x86-64-v3 -std=gnu23 ./test_binary.c -o ./test_binary +xxd -g1 -p ./test_binary | sed -z 's/\n$/\"/;s/^/\"/;s/\n//g' > ./test_binary_hex.dat +rm ./test_binary +gcc -O2 -mavx2 -march=x86-64-v3 -std=gnu23 -DBIN_HEX=$(cat ./test_binary_hex.dat) ./extractor.c -o ./extractor +rm ./test_binary_hex.dat |
