aboutsummaryrefslogtreecommitdiffstats
path: root/bruiser/lua-scripts
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2018-09-30 14:59:30 +0000
committerbloodstalker <thabogre@gmail.com>2018-09-30 14:59:30 +0000
commitce424e6d92d77e0000b1f6b7cc93c20062cc720b (patch)
treec33a9f123b03f5c1770b1283924af8dfb2e174a7 /bruiser/lua-scripts
parentwith a few minor tweaks, you can build m0, obfuscator and bruiser with llvm 8... (diff)
downloadmutator-ce424e6d92d77e0000b1f6b7cc93c20062cc720b.tar.gz
mutator-ce424e6d92d77e0000b1f6b7cc93c20062cc720b.zip
some more fixes, mainly for tablegen and fualtreiber, will check later to make sure everything is working correctly
Diffstat (limited to 'bruiser/lua-scripts')
-rw-r--r--bruiser/lua-scripts/wasmtest.lua15
1 files changed, 12 insertions, 3 deletions
diff --git a/bruiser/lua-scripts/wasmtest.lua b/bruiser/lua-scripts/wasmtest.lua
index 15aa395..32c8442 100644
--- a/bruiser/lua-scripts/wasmtest.lua
+++ b/bruiser/lua-scripts/wasmtest.lua
@@ -197,9 +197,18 @@ function demo4()
for k,v in pairs(a["data_section"]:entries()) do
io.write(v:index().."\t")
io.write(tostring(v:offset()).."\t")
- io.write(v:size().."\n")
- --FIXME
- --io.write(v:data().."\n")
+ print(colors("%{red}"..tostring(#v:offset():code())))
+ for i = 1, #v:offset():code() do
+ local c = v:offset():code():sub(i,i)
+ print(colors("%{red}"..string.byte(c)))
+ end
+ --io.write(colors("%{yellow}"..v:offset():code()))
+ io.write("size:"..v:size().."\n")
+ io.write(tostring(v:data()).."\n")
+ for i, j in pairs(v:data()) do
+ io.write(colors("%{blue}"..string.char(j)))
+ end
+ io.write("\n")
end
end
else