Upload files to "/"
This commit is contained in:
parent
8c6e6ee4b6
commit
b41e747893
4 changed files with 20 additions and 0 deletions
1
compile-crasher.sh
Normal file
1
compile-crasher.sh
Normal file
|
@ -0,0 +1 @@
|
||||||
|
clang++ crasher-src.cpp -ObjC++ --compile --target=wasm32-unknown-unknown-wasm --optimize=3 --output crasher.wasm
|
6
crasher-src.cpp
Normal file
6
crasher-src.cpp
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
int main() {
|
||||||
|
int NULL;
|
||||||
|
volatile int* a = reinterpret_cast<volatile int*>(NULL);
|
||||||
|
*a = 1;
|
||||||
|
return 0;
|
||||||
|
}
|
13
crasher.html
Normal file
13
crasher.html
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>pwnd</head>
|
||||||
|
<body>
|
||||||
|
fetch("crasher.wasm")
|
||||||
|
.then((response) => response.arrayBuffer())
|
||||||
|
.then((bytes) => WebAssembly.instantiate(bytes, importObject))
|
||||||
|
.then((results) => {
|
||||||
|
results.instance.exports.exported_func();
|
||||||
|
});
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
BIN
crasher.wasm
Normal file
BIN
crasher.wasm
Normal file
Binary file not shown.
Loading…
Reference in a new issue