From b41e7478934de0c36237c85bbcbd328269aa0b40 Mon Sep 17 00:00:00 2001 From: toro0t Date: Mon, 9 Dec 2024 00:46:49 +0000 Subject: [PATCH] Upload files to "/" --- compile-crasher.sh | 1 + crasher-src.cpp | 6 ++++++ crasher.html | 13 +++++++++++++ crasher.wasm | Bin 0 -> 326 bytes 4 files changed, 20 insertions(+) create mode 100644 compile-crasher.sh create mode 100644 crasher-src.cpp create mode 100644 crasher.html create mode 100644 crasher.wasm diff --git a/compile-crasher.sh b/compile-crasher.sh new file mode 100644 index 0000000..10ef6cb --- /dev/null +++ b/compile-crasher.sh @@ -0,0 +1 @@ +clang++ crasher-src.cpp -ObjC++ --compile --target=wasm32-unknown-unknown-wasm --optimize=3 --output crasher.wasm diff --git a/crasher-src.cpp b/crasher-src.cpp new file mode 100644 index 0000000..374e050 --- /dev/null +++ b/crasher-src.cpp @@ -0,0 +1,6 @@ +int main() { + int NULL; + volatile int* a = reinterpret_cast(NULL); + *a = 1; + return 0; +} \ No newline at end of file diff --git a/crasher.html b/crasher.html new file mode 100644 index 0000000..f7d24e1 --- /dev/null +++ b/crasher.html @@ -0,0 +1,13 @@ + + +pwnd + +fetch("crasher.wasm") + .then((response) => response.arrayBuffer()) + .then((bytes) => WebAssembly.instantiate(bytes, importObject)) + .then((results) => { + results.instance.exports.exported_func(); + }); + + + diff --git a/crasher.wasm b/crasher.wasm new file mode 100644 index 0000000000000000000000000000000000000000..489d857f148868b2a8e781c9f189aefd7e6dac6b GIT binary patch literal 326 zcmXAky-veG5QKNnkqB{6fR4^3C`u#?3DHJCO+|e?W3(l3Pl_MGW zb2Kt2Yj_ZqCfp5Rwx4#ocv$Nc_MsoRSh3wVCG0$xxRb6f5;Hd0e(h$ymPjWlAOo+ASHQE^{P7H z{Hcm2#6oIenzQnDU9PW-%Q7ZfUcvX6UIgJ98m5s5(UE7%MH|z+RikYsv|moWYRrmW F!yg^;V{`xj literal 0 HcmV?d00001