aboutsummaryrefslogtreecommitdiffstats
path: root/bruiser/lua-scripts/df-demo.lua
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2018-04-21 12:48:01 +0000
committerbloodstalker <thabogre@gmail.com>2018-04-21 12:48:01 +0000
commit64d1ba4efcd6e2f0d01cbf5bc373c47547a7906d (patch)
treedfe134f5f96fdf0fca302db6292ef0f58f54a109 /bruiser/lua-scripts/df-demo.lua
parentfixed #29 (diff)
downloadmutator-64d1ba4efcd6e2f0d01cbf5bc373c47547a7906d.tar.gz
mutator-64d1ba4efcd6e2f0d01cbf5bc373c47547a7906d.zip
two more options for load.py. also fixed the default lua script for bruiser. now it works for everyone if luarocks is in path.
Diffstat (limited to 'bruiser/lua-scripts/df-demo.lua')
-rw-r--r--bruiser/lua-scripts/df-demo.lua25
1 files changed, 18 insertions, 7 deletions
diff --git a/bruiser/lua-scripts/df-demo.lua b/bruiser/lua-scripts/df-demo.lua
index d393988..7db2f85 100644
--- a/bruiser/lua-scripts/df-demo.lua
+++ b/bruiser/lua-scripts/df-demo.lua
@@ -28,19 +28,30 @@ end
function jmp_table_test()
io.write(colors("%{cyan}".."lua:getting text section...\n"))
local text_section = xobj.getTextSection(df_exe)
+ local rodata = xobj.getRODataSection(df_exe)
+ for k,v in pairs(rodata) do
+ if v > 32 and v < 127 then
+ io.write(string.format("%c",v))
+ else
+ io.write(" ")
+ end
+ end
+ io.write("\0\n")
io.write(colors("%{green}".."lua:got text section.\n"))
local head = jmp_s_t()
-- messes up the stack. I could fix it but not sure why i would want to keep this in
--local head2 = jmp_s_t:new()
io.write(colors("%{cyan}".."lua:calling getjmptable\n"))
- head = getjmptable(#text_section, text_section)
+ --head = getjmptable(#text_section, text_section)
- while head:inext() ~= nil do
- head:dump("entry")
- io.write("type:", head:type(), "\tlocation:", "0x"..string.format("%x", head:location()))
- print()
- head = head:inext()
- end
+ --if false then
+ --while head:inext() ~= nil do
+ --head:dump("entry")
+ --io.write("type:", head:type(), "\tlocation:", "0x"..string.format("%x", head:location()))
+ --print()
+ --head = head:inext()
+ --end
+ --end
end
--main()