Process elf correctly

This commit is contained in:
s809
2025-01-21 00:33:43 +05:00
parent d8401a8f49
commit 68793fbe8d
7 changed files with 181 additions and 50 deletions
+5
View File
@@ -0,0 +1,5 @@
$ErrorActionPreference = "Stop"
python -m venv .venv
.\.venv\Scripts\activate
pip install lief
+7
View File
@@ -0,0 +1,7 @@
#!/bin/sh
set -e
python -m venv .venv
. ./.venv/bin/activate
pip install lief
+8
View File
@@ -0,0 +1,8 @@
import sys
import lief
# print("imported", file=sys.stderr)
binary = lief.parse(sys.stdin.buffer.read())
# print([func.name for func in binary.exported_functions], file=sys.stderr)
binary.write(sys.argv[1])