athre0z / wasm Goto Github PK
View Code? Open in Web Editor NEWWebAssembly decoder & disassembler library
License: MIT License
WebAssembly decoder & disassembler library
License: MIT License
I fuzzed this library and got some crash. Could i get cve numbers for reporting the bugs. crash like this:
for cur_sec, cur_sec_data in mod_iter:
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/wasm/decode.py", line 45, in decode_module
sec_len, sec_data, _ = sec.from_raw(None, module_wnd)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/wasm/types.py", line 302, in from_raw
data_len, val, data_type = cur_field.from_raw(data, raw[offs:])
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/wasm/types.py", line 188, in from_raw
return self.choice_field_map[choice].from_raw(ctx, raw)
KeyError: 90
Is there also a python wasm assembler somewhere, so that we can write back the modified AST?
Hi, just did a simple test:
int add(int a, int b) {
return a + b;
}
emcc testwasm.c -o test.wasm -s WASM=1 -s SIDE_MODULE=1
Command wasmdump --disas test.wasm
fails with:
emscripten@euve254883:~$ wasmdump --disas test.wasm
- [ ModuleHeader
| magic = 0x6d736100
| version = 0x1
- [ Section
| id = 0
| payload_len = 12
| name_len = 6
| name = "dylink"
| payload = [0x80, 0x80, 0xc0, 0x2, 0x0, 0x1, 0x9c, 0x80, 0x80, 0x80, 0x0, 0x6]
| overhang = []
Traceback (most recent call last):
File "/home/emscripten/.local/bin/wasmdump", line 11, in <module>
load_entry_point('wasm==1.1', 'console_scripts', 'wasmdump')()
File "/home/emscripten/.local/lib/python2.7/site-packages/wasm/__main__.py", line 34, in dump
for cur_sec, cur_sec_data in mod_iter:
File "/home/emscripten/.local/lib/python2.7/site-packages/wasm/decode.py", line 45, in decode_module
sec_len, sec_data, _ = sec.from_raw(None, module_wnd)
File "/home/emscripten/.local/lib/python2.7/site-packages/wasm/types.py", line 302, in from_raw
data_len, val, data_type = cur_field.from_raw(data, raw[offs:])
File "/home/emscripten/.local/lib/python2.7/site-packages/wasm/types.py", line 188, in from_raw
return self.choice_field_map[choice].from_raw(ctx, raw)
KeyError: 96
Version emcc -v
:
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 1.37.18
clang version 4.0.0 (emscripten 1.37.18 : 1.37.18)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: E:\emsdk-1.35.0-portable-64bit\clang\e1.37.18_64bit
INFO:root:(Emscripten: Running sanity checks)
my username is jordan69420 and I have the solution for your problem just hire me on gitcoin
Error like
File "/usr/local/lib/python3.7/site-packages/wasm-1.2-py3.7.egg/wasm/types.py", line 302, in from_raw
data_len, val, data_type = cur_field.from_raw(data, raw[offs:])
File "/usr/local/lib/python3.7/site-packages/wasm-1.2-py3.7.egg/wasm/types.py", line 188, in from_raw
return self.choice_field_map[choice].from_raw(ctx, raw)
KeyError: 105
How is it possible to get the associated name of the function body?
This looks like it could be a very useful library for my use case, but the two very short examples provided give no insight into how I can use the module to extract functions from a .wasm file. Could you provide some kind of documentation for the module's methods, classes and class methods, etc. along with more comprehensive examples, so that we don't have to sift through the source code to figure out how to use this module?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.