Upload files to "/"

This commit is contained in:
toro0t 2024-12-09 00:46:49 +00:00
parent 8c6e6ee4b6
commit b41e747893
4 changed files with 20 additions and 0 deletions

1
compile-crasher.sh Normal file
View 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
View 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
View 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

Binary file not shown.