-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprobe.html
More file actions
96 lines (95 loc) · 8.16 KB
/
probe.html
File metadata and controls
96 lines (95 loc) · 8.16 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta id="viewport" name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no">
<title>Probe</title>
</head>
<body>
<ol>
<li id="user_agent">user_agent:</li>
<li id="url_path">pathname:</li>
<li id="url_search">search:</li>
<li id="url_hash">hash:</li>
<li id="url_name">window.name:</li>
<li id="cookies">cookies:</li>
<li id="methods_diff">methods(diff):</li>
<li id="methods_unknown">methods(unkonwn):</li>
</ol>
<script type="text/javascript">
(function () {
if (top.location != location) {
top.postMessage(Object.keys(window), '*')
return;
}
document.querySelector("#user_agent").append(navigator.userAgent);
document.querySelector("#url_path").append(location.pathname);
let ul_search = document.createElement('ul');
let search = location.search.substring(1);
if (search !== "") {
search.split("&").forEach(function (elem) {
let li = document.createElement('li');
li.textContent = elem
ul_search.appendChild(li)
})
}
document.querySelector("#url_search").append(ul_search);
document.querySelector("#url_hash").append(location.hash);
document.querySelector("#url_name").append(window.name);
document.querySelector("#cookies").append(document.cookie);
const known = ["0", "window", "self", "document", "name", "location", "customElements", "history", "locationbar", "menubar", "personalbar", "scrollbars", "statusbar", "toolbar", "status", "closed", "frames", "length", "top", "opener", "parent", "frameElement", "navigator", "origin", "external", "screen", "innerWidth", "innerHeight", "scrollX", "pageXOffset", "scrollY", "pageYOffset", "visualViewport", "screenX", "screenY", "outerWidth", "outerHeight", "devicePixelRatio", "clientInformation", "screenLeft", "screenTop", "defaultStatus", "defaultstatus", "styleMedia", "onsearch", "isSecureContext", "performance", "onappinstalled", "onbeforeinstallprompt", "crypto", "indexedDB", "webkitStorageInfo", "sessionStorage", "localStorage", "onbeforexrselect", "onabort", "onblur", "oncancel", "oncanplay", "oncanplaythrough", "onchange", "onclick", "onclose", "oncontextmenu", "oncuechange", "ondblclick", "ondrag", "ondragend", "ondragenter", "ondragleave", "ondragover", "ondragstart", "ondrop", "ondurationchange", "onemptied", "onended", "onerror", "onfocus", "onformdata", "oninput", "oninvalid", "onkeydown", "onkeypress", "onkeyup", "onload", "onloadeddata", "onloadedmetadata", "onloadstart", "onmousedown", "onmouseenter", "onmouseleave", "onmousemove", "onmouseout", "onmouseover", "onmouseup", "onmousewheel", "onpause", "onplay", "onplaying", "onprogress", "onratechange", "onreset", "onresize", "onscroll", "onsecuritypolicyviolation", "onseeked", "onseeking", "onselect", "onslotchange", "onstalled", "onsubmit", "onsuspend", "ontimeupdate", "ontoggle", "onvolumechange", "onwaiting", "onwebkitanimationend", "onwebkitanimationiteration", "onwebkitanimationstart", "onwebkittransitionend", "onwheel", "onauxclick", "ongotpointercapture", "onlostpointercapture", "onpointerdown", "onpointermove", "onpointerup", "onpointercancel", "onpointerover", "onpointerout", "onpointerenter", "onpointerleave", "onselectstart", "onselectionchange", "onanimationend", "onanimationiteration", "onanimationstart", "ontransitionrun", "ontransitionstart", "ontransitionend", "ontransitioncancel", "onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onlanguagechange", "onmessage", "onmessageerror", "onoffline", "ononline", "onpagehide", "onpageshow", "onpopstate", "onrejectionhandled", "onstorage", "onunhandledrejection", "onunload", "alert", "atob", "blur", "btoa", "cancelAnimationFrame", "cancelIdleCallback", "captureEvents", "clearInterval", "clearTimeout", "close", "confirm", "createImageBitmap", "fetch", "find", "focus", "getComputedStyle", "getSelection", "matchMedia", "moveBy", "moveTo", "open", "postMessage", "print", "prompt", "queueMicrotask", "releaseEvents", "reportError", "requestAnimationFrame", "requestIdleCallback", "resizeBy", "resizeTo", "scroll", "scrollBy", "scrollTo", "setInterval", "setTimeout", "stop", "structuredClone", "webkitCancelAnimationFrame", "webkitRequestAnimationFrame", "chrome", "originAgentCluster", "trustedTypes", "speechSynthesis", "onpointerrawupdate", "crossOriginIsolated", "scheduler", "openDatabase", "webkitRequestFileSystem", "webkitResolveLocalFileSystemURL", "__catcherThrottle", "__logPostMessage", "__closeLogPostMessage", "__openLogPostMessage", "__catcherCreateIframeObserver", "VConsole", "_vcOrigConsole", "arr", "applicationCache", "event", "offscreenBuffering", "onanimationcancel", "orientation", "onorientationchange", "webkitIndexedDB", "webkitCancelRequestAnimationFrame", "showModalDialog", "getMatchedCSSRules", "webkitConvertPointFromPageToNode", "webkitConvertPointFromNodeToPage", "browser", "getDefaultComputedStyle", "scrollByLines", "scrollByPages", "sizeToContent", "updateCommands", "dump", "setResizable", "mozInnerScreenX", "mozInnerScreenY", "scrollMaxX", "scrollMaxY", "fullScreen", "ondevicemotion", "ondeviceorientation", "onabsolutedeviceorientation", "InstallTrigger", "sidebar", "onbeforeinput", "ondragexit", "onloadend", "onmozfullscreenchange", "onmozfullscreenerror", "ongamepadconnected", "ongamepaddisconnected", "caches", "navigation", "onbeforetoggle", "oncontextlost", "oncontextrestored", "fence", "cookieStore", "ondeviceorientationabsolute", "launchQueue", "sharedStorage", "documentPictureInPicture", "onbeforematch", "getScreenDetails", "queryLocalFonts", "showDirectoryPicker", "showOpenFilePicker", "showSaveFilePicker", "credentialless", "oncontentvisibilityautostatechange", "onscrollend", "oncopy", "oncut", "onpaste", "oriGetCurrLocation", "oriWatchPosition", "weixinPostMessageHandlers", "ontouchcancel", "ontouchend", "ontouchmove", "ontouchstart"]
let diff = [];
let unknown = [];
window.addEventListener('message', function (event) {
if (window[0] !== event.source) {
return
}
let iframeKeys = event.data;
let ul_diff = document.createElement('ul');
let ul_unknown = document.createElement('ul');
for (let key in window) {
if (iframeKeys.indexOf(key) < 0 && key != 0) {
diff.push(key);
let li = document.createElement('li');
li.textContent = key
ul_diff.appendChild(li)
}
if (known.indexOf(key) < 0 && iframeKeys.indexOf(key) >= 0) {
unknown.push(key);
let li = document.createElement('li');
li.textContent = key
ul_unknown.appendChild(li)
}
}
document.querySelector("#methods_diff").appendChild(ul_diff);
document.querySelector("#methods_unknown").appendChild(ul_unknown);
}, false);
let iframe = document.createElement('iframe');
iframe.src = location.href + "#inframe";
iframe.style = "display: none;"
document.body.appendChild(iframe);
document.querySelector("iframe").contentWindow.postMessage("message", "*");
let script = document.createElement('script');
script.src = "https://unpkg.com/vconsole@latest/dist/vconsole.min.js";
document.body.appendChild(script);
script.onload = function () {
new window.VConsole();
diff.forEach(function (elem) {
console.log("[>>>>>>>>>" + elem + "<<<<<<<<<]");
console.log(window[elem]);
console.log("[-------end-------]");
})
unknown.forEach(function (elem) {
console.log("[>>>>>>>>>" + elem + "<<<<<<<<<]");
console.log(window[elem]);
console.log("[-------end-------]");
})
console.log("[>>>>>>>>>" + window + "<<<<<<<<<]");
console.log(window);
console.log("[-------end-------]");
}
})();
</script>
</body>
</html>