From e4b9b6b65036644f49cf3839c8e47a7b95907cf8 Mon Sep 17 00:00:00 2001 From: 0xvpr Date: Sun, 5 Jun 2022 04:18:21 -0400 Subject: [PATCH] README added; c-style char array improved; makefile improved --- README.md | 21 +++ bin/vpr-extract | Bin 14472 -> 14472 bytes build/main.o | Bin 8688 -> 8808 bytes f.bin | 340 ------------------------------------------------ makefile | 23 +++- 5 files changed, 38 insertions(+), 346 deletions(-) create mode 100644 README.md delete mode 100644 f.bin diff --git a/README.md b/README.md new file mode 100644 index 0000000..cab6ea2 --- /dev/null +++ b/README.md @@ -0,0 +1,21 @@ +# vpr-extract +This project aims to provide a tool for the extraction of the +text section of an executable + +## Build instructions +```bash +git clone https://github.com/0xvpr/vpr-extract +cd vpr-extract +make +# sudo make install # uncomment if you want it available globally (only recommended for LINUX/WSL/MSYS environments) +``` + +## Example Usage +```bash +vpr-extract path/to/file1 -s -o out.txt +``` + +## Testing (Needs improvement) +```bash +chmod +x ./run-test.sh +``` diff --git a/bin/vpr-extract b/bin/vpr-extract index d750a78e00365b02770150a41c1412b89a58cdd6..cb7fbf1a0949288265d5e2000c25743d66bc1025 100644 GIT binary patch delta 1765 zcma)7Z)_7~7=N$z+y?7zpkponHd$eeF-RdbPMvbF$(3|bWCIQ2&>;#RkjaLCNDH^Z zF6CfyGqR{r3??YV4|Gl;WGew2B-1e?8l6NmDsQtb1INO;F8z_j!KL z^Lzf?wXUkJs@^GNzvb#nxs*)I&!xyXVTJAflN*i=8&x~(7bmRgpS6+5tJkY_k?r;- zyNft2;44MeneZdgh%d=CR@iS;j-MY`HW+-kpr%`DULpkJi>fE8u_uFZx3uT5oe-({ zy03Ek=fp4cJ;tuKiMtC3sYEQfuqV(`UmO;C%S4y=%@k-U5sOq%O?@+hbR?q-z%vn(lZuW6wTx6HE2U~at!-qb)_+QbX_*0^G2VDNM) zS|2?Lq&mo|b9CjV8W%QqtAp7Kq_^7^1epN4+QsNQ7Nq7f$8WPDe}u?rB7GNEANm#G zz4uvN34%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