diff options
author | bloodstalker <thabogre@gmail.com> | 2018-01-02 19:12:05 +0000 |
---|---|---|
committer | bloodstalker <thabogre@gmail.com> | 2018-01-02 19:12:05 +0000 |
commit | d7f4a97c10813eb4f8e8a31064deedbf0d7d2a8b (patch) | |
tree | ba63aaa4624329a7b23350ffc8f8f77c1ac0dc43 /bruiser/lua-scripts/demo1.lua | |
parent | wip (diff) | |
download | mutator-d7f4a97c10813eb4f8e8a31064deedbf0d7d2a8b.tar.gz mutator-d7f4a97c10813eb4f8e8a31064deedbf0d7d2a8b.zip |
load.py now loads all objects and functions along with names to c++. next is getting them to lua.
Diffstat (limited to '')
-rw-r--r-- | bruiser/lua-scripts/demo1.lua | 47 |
1 files changed, 45 insertions, 2 deletions
diff --git a/bruiser/lua-scripts/demo1.lua b/bruiser/lua-scripts/demo1.lua index 98bdb0d..b382f2d 100644 --- a/bruiser/lua-scripts/demo1.lua +++ b/bruiser/lua-scripts/demo1.lua @@ -1,2 +1,45 @@ -objload("elf_get_func_names", "../bfd/test/test.so", "symbol_list") -objload("main2", "../bfd/test/test.so", "code_list") +-- +-- get the .so object names +-- objload("elf_get_obj_names", "../bfd/test/test.so", "symbol_list") +-- +-- get the .so object sizes +-- objload("elf_get_obj_sizes", "../bfd/test/test.so", "symbol_list") +-- +-- get the .so function names +-- objload("elf_get_func_names", "../bfd/test/test.so", "symbol_list") +-- get the .so function code +-- objload("elf_get_func_code", "../bfd/test/test.so", "code_list") +-- + +function printObjNames() + local c = {objload("elf_get_obj_names", "../bfd/test/test.so", "symbol_list")} + for k,v in ipairs(c) do + print(k,v) + end +end + +function printObjSizes() + local c = {objload("elf_get_obj_sizes", "../bfd/test/test.so", "symbol_list")} + for k,v in ipairs(c) do + print(k,v) + end +end + +function printFuncNames() + local c = {objload("elf_get_func_names", "../bfd/test/test.so", "symbol_list")} + for k,v in ipairs(c) do + print(k,v) + end +end + +function printFuncCode() + local c = {objload("elf_get_func_code", "../bfd/test/test.so", "code_list")} + for k,v in ipairs(c) do + print(k,v) + end +end + +printObjNames() +printObjSizes() +printFuncNames() +--printFuncCode() |