Help
RSS
API
Feed
Maltego
Contact
Domain > chicken-maze.run
×
More information on this domain is in
AlienVault OTX
Is this malicious?
Yes
No
DNS Resolutions
Date
IP Address
2023-08-27
52.9.92.215
(
ClassC
)
2026-01-30
54.219.233.220
(
ClassC
)
Port 443
HTTP/1.1 200 OKDate: Fri, 30 Jan 2026 09:12:20 GMTContent-Type: text/html; charsetutf-8Content-Length: 65091Connection: keep-alive !DOCTYPE html>html langen>head>meta charsetutf-8/>title>wkndr/title>style>div, canvas { margin: 0; padding: 0; }#wkndr-body { width: 100%; height: 100%; background-color: black; margin: 0; }#wkndr-graphics-container, #wkndr-terminal-container, canvas { position: absolute; background: rgba(0, 0, 0, 0); }body.split-screen #wkndr-graphics-container { width: calc(50% - 2em); height: calc(100% - 2em); margin: 1em; }body.split-screen #wkndr-terminal-container { left: 50%; width: calc(50% - 1em); height: calc(100% - 2em); margin: 1em 0 1em 1em; }#wkndr-graphics-container { width: calc(100% - 2em); height: calc(100% - 2em); margin: 1em; }#wkndr-terminal-container { width: calc(50% - 2em); height: calc(100% - 2em); margin: 1em 0 1em 1em; }body.split-screen #wkndr-terminal-container .xterm .xterm-viewport { overflow-y: scroll; }#wkndr-terminal-container .xterm .xterm-viewport { overflow-y: hidden; }.maxwh { width: 100%; height: 100%; }/style>/head>body idwkndr-body>div idwkndr-graphics-container oncontextmenuevent.preventDefault()>canvas idcanvas classmaxwh>/canvas>/div>script>(function (global, factory) { typeof exports object && typeof module ! undefined ? module.exports factory() : typeof define function && define.amd ? define(factory) : (global global || self, global.morphdom factory());}(this, function () { use strict; var DOCUMENT_FRAGMENT_NODE 11; function morphAttrs(fromNode, toNode) { var toNodeAttrs toNode.attributes; var attr; var attrName; var attrNamespaceURI; var attrValue; var fromValue; // document-fragments dont have attributes so lets not do anything if (toNode.nodeType DOCUMENT_FRAGMENT_NODE || fromNode.nodeType DOCUMENT_FRAGMENT_NODE) { return; } // update attributes on original DOM element for (var i 0; i toNodeAttrs.length; i++) { attr toNodeAttrsi; attrName attr.name; attrNamespaceURI attr.namespaceURI; attrValue attr.value; if (attrNamespaceURI) { attrName attr.localName || attrName; fromValue fromNode.getAttributeNS(attrNamespaceURI, attrName); if (fromValue ! attrValue) { if (attr.prefix xmlns){ attrName attr.name; // Its not allowed to set an attribute with the XMLNS namespace without specifying the `xmlns` prefix } fromNode.setAttributeNS(attrNamespaceURI, attrName, attrValue); } } else { fromValue fromNode.getAttribute(attrName); if (fromValue ! attrValue) { fromNode.setAttribute(attrName, attrValue); } } } // Remove any extra attributes found on the original DOM element that // werent found on the target element. var fromNodeAttrs fromNode.attributes; for (var d 0; d fromNodeAttrs.length; d++) { attr fromNodeAttrsd; attrName attr.name; attrNamespaceURI attr.namespaceURI; if (attrNamespaceURI) { attrName attr.localName || attrName; if (!toNode.hasAttributeNS(attrNamespaceURI, attrName)) { fromNode.removeAttributeNS(attrNamespaceURI, attrName); } } else { if (!toNode.hasAttribute(attrName)) { fromNode.removeAttribute(attrName); } } } } var range; // Create a range object for efficently rendering strings to elements. var NS_XHTML http://www.w3.org/1999/xhtml; var doc typeof document undefined ? undefined : document; var HAS_TEMPLATE_SUPPORT !!doc && content in doc.createElement(template); var HAS_RANGE_SUPPORT !!doc && doc.createRange && createContextualFragment in doc.createRange(); function createFragmentFromTemplate(str) { var template doc.createElement(template); template.innerHTML str; return template.content.childNodes0; } function createFragmentFromRange(str) { if (!range) { range doc.createRange(); range.selectNode(doc.body); } var fragment range.createContextualFragment(str); return fragment.childNodes0; } function createFragmentFromWrap(str) { var fragment doc.createElement(body); fragment.innerHTML str; return fragment.childNodes0; } /** * This is about the same * var html new DOMParser().parseFromString(str, text/html); * return html.body.firstChild; * * @method toElement * @param {String} str */ function toElement(str) { str str.trim(); if (HAS_TEMPLATE_SUPPORT) { // avoid restrictions on content for things like `tr>th>Hi/th>/tr>` which // createContextualFragment doesnt support // template> support not available in IE return createFragmentFromTemplate(str); } else if (HAS_RANGE_SUPPORT) { return createFragmentFromRange(str); } return createFragmentFromWrap(str); } /** * Returns true if two nodes names are the same. * * NOTE: We dont bother checking `namespaceURI` because you will never find two HTML elements with the same * nodeName and different namespace URIs. * * @param {Element} a * @param {Element} b The target element * @return {boolean} */ function compareNodeNames(fromEl, toEl) { var fromNodeName fromEl.nodeName; var toNodeName toEl.nodeName; if (fromNodeName toNodeName) { return true; } if (toEl.actualize && fromNodeName.charCodeAt(0) 91 && /* from tag name is upper case */ toNodeName.charCodeAt(0) > 90 /* target tag name is lower case */) { // If the target element is a virtual DOM node then we may need to normalize the tag name // before comparing. Normal HTML elements that are in the http://www.w3.org/1999/xhtml // are converted to upper case return fromNodeName toNodeName.toUpperCase(); } else { return false; } } /** * Create an element, optionally with a known namespace URI. * * @param {string} name the element name, e.g. div or svg * @param {string} namespaceURI the elements namespace URI, i.e. the value of * its `xmlns` attribute or its inferred namespace. * * @return {Element} */ function createElementNS(name, namespaceURI) { return !namespaceURI || namespaceURI NS_XHTML ? doc.createElement(name) : doc.createElementNS(namespaceURI, name); } /** * Copies the children of one DOM element to another DOM element */ function moveChildren(fromEl, toEl) { var curChild fromEl.firstChild; while (curChild) { var nextChild curChild.nextSibling; toEl.appendChild(curChild); curChild nextChild; } return toEl; } function syncBooleanAttrProp(fromEl, toEl, name) { if (fromElname ! toElname) { fromElname toElname; if (fromElname) { fromEl.setAttribute(name, ); } else { fromEl.removeAttribute(name); } } } var specialElHandlers { OPTION: function(fromEl, toEl) { var parentNode fromEl.parentNode; if (parentNode) { var parentName parentNode.nodeName.toUpperCase(); if (parentName OPTGROUP) { parentNode parentNode.parentNode; parentName parentNode && parentNode.nodeName.toUpperCase(); } if (parentName SELECT && !parentNode.hasAttribute(multiple)) { if (fromEl.hasAttribute(selected) && !toEl.selected) { // Workaround for MS Edge bug where the selected attribute can only be // removed if set to a non-empty value: // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/12087679/ fromEl.setAttribute(selected, selected); fromEl.removeAttribute(selected); } // We have to reset select elements selectedIndex to -1, otherwise setting // fromEl.selected using the syncBooleanAttrProp below has no effect. // The correct selectedIndex will be set in the SELECT special handler below. parentNode.selectedIndex -1; } } syncBooleanAttrProp(fromEl, toEl, selected); }, /** * The value attribute is special for the input> element since it sets * the initial value. Changing the value attribute without changing the * value property will have no effect since it is only used to the set the * initial value. Similar for the checked attribute, and disabled. */ INPUT: function(fromEl, toEl) { syncBooleanAttrProp(fromEl, toEl, checked); syncBooleanAttrProp(fromEl, toEl, disabled); if (fromEl.value ! toEl.value) { fromEl.value toEl.value; } if (!toEl.hasAttribute(value)) { fromEl.removeAttribute(value); } }, TEXTAREA: function(fromEl, toEl) { var newValue toEl.value; if (fromEl.value ! newValue) { fromEl.value newValue; } var firstChild fromEl.firstChild; if (firstChild) { // Needed for IE. Apparently IE sets the placeholder as the // node value and vise versa. This ignores an empty update. var oldValue firstChild.nodeValue; if (oldValue newValue || (!newValue && oldValue fromEl.placeholder)) { return; } firstChild.nodeValue newValue; } }, SELECT: function(fromEl, toEl) { if (!toEl.hasAttribute(multiple)) { var selectedIndex -1; var i 0; // We have to loop through children of fromEl, not toEl since nodes can be moved // from toEl to fromEl directly when morphing. // At the time this special handler is invoked, all children have already been morphed // and appended to / removed from fromEl, so using fromEl here is safe and correct. var curChild fromEl.firstChild; var optgroup; var nodeName; while(curChild) { nodeName curChild.nodeName && curChild.nodeName.toUpperCase(); if (nodeName OPTGROUP) { optgroup curChild; curChild optgroup.firstChild; } else { if (nodeName OPTION) { if (curChild.hasAttribute(selected)) { selectedIndex i; break; } i++; } curChild curChild.nextSibling; if (!curChild && optgroup) { curChild optgroup.nextSibling; optgroup null; } } } fromEl.selectedIndex selectedIndex; } } }; var ELEMENT_NODE 1; var DOCUMENT_FRAGMENT_NODE$1 11; var TEXT_NODE 3; var COMMENT_NODE 8; function noop() {} function defaultGetNodeKey(node) { return node.id; } function morphdomFactory(morphAttrs) { return function morphdom(fromNode, toNode, options) { if (!options) { options {}; } if (typeof toNode string) { if (fromNode.nodeName #document || fromNode.nodeName HTML) { var toNodeHtml toNode; toNode doc.createElement(html); toNode.innerHTML toNodeHtml; } else { toNode toElement(toNode); } } var getNodeKey options.getNodeKey || defaultGetNodeKey; var onBeforeNodeAdded options.onBeforeNodeAdded || noop; var onNodeAdded options.onNodeAdded || noop; var onBeforeElUpdated options.onBeforeElUpdated || noop; var onElUpdated options.onElUpdated || noop; var onBeforeNodeDiscarded options.onBeforeNodeDiscarded || noop; var onNodeDiscarded options.onNodeDiscarded || noop; var onBeforeElChildrenUpdated options.onBeforeElChildrenUpdated || noop; var childrenOnly options.childrenOnly true; // This object is used as a lookup to quickly find all keyed elements in the original DOM tree. var fromNodesLookup Object.create(null); var keyedRemovalList ; function addKeyedRemoval(key) { keyedRemovalList.push(key); } function walkDiscardedChildNodes(node, skipKeyedNodes) { if (node.nodeType ELEMENT_NODE) { var curChild node.firstChild; while (curChild) { var key undefined; if (skipKeyedNodes && (key getNodeKey(curChild))) { // If we are skipping keyed nodes then we add the key // to a list so that it can be handled at the very end. addKeyedRemoval(key); } else { // Only report the node as discarded if it is not keyed. We do this because // at the end we loop through all keyed elements that were unmatched // and then discard them in one final pass. onNodeDiscarded(curChild); if (curChild.firstChild) { walkDiscardedChildNodes(curChild, skipKeyedNodes); } } curChild curChild.nextSibling; } } } /** * Removes a DOM node out of the original DOM * * @param {Node} node The node to remove * @param {Node} parentNode The nodes parent * @param {Boolean} skipKeyedNodes If true then elements with keys will be skipped and not discarded. * @return {undefined} */ function removeNode(node, parentNode, skipKeyedNodes) { if (onBeforeNodeDiscarded(node) false) { return; } if (parentNode) { parentNode.removeChild(node); } onNodeDiscarded(node); walkDiscardedChildNodes(node, skipKeyedNodes); } // // TreeWalker implementation is no faster, but keeping this around in case this changes in the future // function indexTree(root) { // var treeWalker document.createTreeWalker( // root, // NodeFilter.SHOW_ELEMENT); // // var el; // while((el treeWalker.nextNode())) { // var key getNodeKey(el); // if (key) { // fromNodesLookupkey el; // } // } // } // // NodeIterator implementation is no faster, but keeping this around in case this changes in the future // // function indexTree(node) { // var nodeIterator document.createNodeIterator(node, NodeFilter.SHOW_ELEMENT); // var el; // while((el nodeIterator.nextNode())) { // var key getNodeKey(el); // if (key) { // fromNodesLookupkey el; // } // } // } function indexTree(node) { if (node.nodeType ELEMENT_NODE || node.nodeType DOCUMENT_FRAGMENT_NODE$1) { var curChild node.firstChild; while (curChild) { var key getNodeKey(curChild); if (key) { fromNodesLookupkey curChild; } // Walk recursively indexTree(curChild); curChild curChild.nextSibling; } } } indexTree(fromNode); function handleNodeAdded(el) { onNodeAdded(el); var curChild el.firstChild; while (curChild) { var nextSibling curChild.nextSibling; var key getNodeKey(curChild); if (key) { var unmatchedFromEl fromNodesLookupkey; if (unmatchedFromEl && compareNodeNames(curChild, unmatchedFromEl)) { curChild.parentNode.replaceChild(unmatchedFromEl, curChild); morphEl(unmatchedFromEl, curChild); } } handleNodeAdded(curChild); curChild nextSibling; } } function cleanupFromEl(fromEl, curFromNodeChild, curFromNodeKey) { // We have processed all of the to nodes. If curFromNodeChild is // non-null then we still have some from nodes left over that need // to be removed while (curFromNodeChild) { var fromNextSibling curFromNodeChild.nextSibling; if ((curFromNodeKey getNodeKey(curFromNodeChild))) { // Since the node is keyed it might be matched up later so we defer // the actual removal to later addKeyedRemoval(curFromNodeKey); } else { // NOTE: we skip nested keyed nodes from being removed since there is // still a chance they will be matched up later removeNode(curFromNodeChild, fromEl, true /* skip keyed nodes */); } curFromNodeChild fromNextSibling; } } function morphEl(fromEl, toEl, childrenOnly) { var toElKey getNodeKey(toEl); if (toElKey) { // If an element with an ID is being morphed then it will be in the final // DOM so clear it out of the saved elements collection delete fromNodesLookuptoElKey; } if (!childrenOnly) { // optional if (onBeforeElUpdated(fromEl, toEl) false) { return; } // update attributes on original DOM element first morphAttrs(fromEl, toEl); // optional onElUpdated(fromEl); if (onBeforeElChildrenUpdated(fromEl, toEl) false) { return; } } if (fromEl.nodeName ! TEXTAREA) { morphChildren(fromEl, toEl); } else { specialElHandlers.TEXTAREA(fromEl, toEl); } } function morphChildren(fromEl, toEl) { var curToNodeChild toEl.firstChild; var curFromNodeChild fromEl.firstChild; var curToNodeKey; var curFromNodeKey; var fromNextSibling; var toNextSibling; var matchingFromEl; // walk the children outer: while (curToNodeChild) { toNextSibling curToNodeChild.nextSibling; curToNodeKey getNodeKey(curToNodeChild); // walk the fromNode children all the way through while (curFromNodeChild) { fromNextSibling curFromNodeChild.nextSibling; if (curToNodeChild.isSameNode && curToNodeChild.isSameNode(curFromNodeChild)) { curToNodeChild toNextSibling; curFromNodeChild fromNextSibling; continue outer; } curFromNodeKey getNodeKey(curFromNodeChild); var curFromNodeType curFromNodeChild.nodeType; // this means if the curFromNodeChild doesnt have a match with the curToNodeChild var isCompatible undefined; if (curFromNodeType curToNodeChild.nodeType) { if (curFromNodeType ELEMENT_NODE) { // Both nodes being compared are Element nodes if (curToNodeKey) { // The target node has a key so we want to match it up with the correct element // in the original DOM tree if (curToNodeKey ! curFromNodeKey) { // The current element in the original DOM tree does not have a matching key so // lets check our lookup to see if there is a matching element in the original // DOM tree if ((matchingFromEl fromNodesLookupcurToNodeKey)) { if (fromNextSibling matchingFromEl) { // Special case for single element removals. To avoid removing the original // DOM node out of the tree (since that can break CSS transitions, etc.), // we will instead discard the current node and wait until the next // iteration to properly match up the keyed target element with its matching // element in the original tree isCompatible false; } else { // We found a matching keyed element somewhere in the original DOM tree. // Lets move the original DOM node into the current position and morph // it. // NOTE: We use insertBefore instead of replaceChild because we want to go through // the `removeNode()` function for the node that is being discarded so that // all lifecycle hooks are correctly invoked fromEl.insertBefore(matchingFromEl, curFromNodeChild); // fromNextSibling curFromNodeChild.nextSibling; if (curFromNodeKey) { // Since the node is keyed it might be matched up later so we defer // the actual removal to later addKeyedRemoval(curFromNodeKey); } else { // NOTE: we skip nested keyed nodes from being removed since there is // still a chance they will be matched up later removeNode(curFromNodeChild, fromEl, true /* skip keyed nodes */); } curFromNodeChild matchingFromEl; } } else { // The nodes are not compatible since the to node has a key and there // is no matching keyed node in the source tree isCompatible false; } } } else if (curFromNodeKey) { // The original has a key isCompatible false; } isCompatible isCompatible ! false && compareNodeNames(curFromNodeChild, curToNodeChild); if (isCompatible) { // We found compatible DOM elements so transform // the current from node to match the current // target DOM node. // MORPH morphEl(curFromNodeChild, curToNodeChild); } } else if (curFromNodeType TEXT_NODE || curFromNodeType COMMENT_NODE) { // Both nodes being compared are Text or Comment nodes isCompatible true; // Simply update nodeValue on the original node to // change the text value if (curFromNodeChild.nodeValue ! curToNodeChild.nodeValue) { curFromNodeChild.nodeValue curToNodeChild.nodeValue; } } } if (isCompatible) { // Advance both the to child and the from child since we found a match // Nothing else to do as we already recursively called morphChildren above curToNodeChild toNextSibling; curFromNodeChild fromNextSibling; continue outer; } // No compatible match so remove the old node from the DOM and continue trying to find a // match in the original DOM. However, we only do this if the from node is not keyed // since it is possible that a keyed node might match up with a node somewhere else in the // target tree and we dont want to discard it just yet since it still might find a // home in the final DOM tree. After everything is done we will remove any keyed nodes // that didnt find a home if (curFromNodeKey) { // Since the node is keyed it might be matched up later so we defer // the actual removal to later addKeyedRemoval(curFromNodeKey); } else { // NOTE: we skip nested keyed nodes from being removed since there is // still a chance they will be matched up later removeNode(curFromNodeChild, fromEl, true /* skip keyed nodes */); } curFromNodeChild fromNextSibling; } // END: while(curFromNodeChild) {} // If we got this far then we did not find a candidate match for // our to node and we exhausted all of the children from // nodes. Therefore, we will just append the current to node // to the end if (curToNodeKey && (matchingFromEl fromNodesLookupcurToNodeKey) && compareNodeNames(matchingFromEl, curToNodeChild)) { fromEl.appendChild(matchingFromEl); // MORPH morphEl(matchingFromEl, curToNodeChild); } else { var onBeforeNodeAddedResult onBeforeNodeAdded(curToNodeChild); if (onBeforeNodeAddedResult ! false) { if (onBeforeNodeAddedResult) { curToNodeChild onBeforeNodeAddedResult; } if (curToNodeChild.actualize) { curToNodeChild curToNodeChild.actualize(fromEl.ownerDocument || doc); } fromEl.appendChild(curToNodeChild); handleNodeAdded(curToNodeChild); } } curToNodeChild toNextSibling; curFromNodeChild fromNextSibling; } cleanupFromEl(fromEl, curFromNodeChild, curFromNodeKey); var specialElHandler specialElHandlersfromEl.nodeName; if (specialElHandler) { specialElHandler(fromEl, toEl); } } // END: morphChildren(...) var morphedNode fromNode; var morphedNodeType morphedNode.nodeType; var toNodeType toNode.nodeType; if (!childrenOnly) { // Handle the case where we are given two DOM nodes that are not // compatible (e.g. div> --> span> or div> --> TEXT) if (morphedNodeType ELEMENT_NODE) { if (toNodeType ELEMENT_NODE) { if (!compareNodeNames(fromNode, toNode)) { onNodeDiscarded(fromNode); morphedNode moveChildren(fromNode, createElementNS(toNode.nodeName, toNode.namespaceURI)); } } else { // Going from an element node to a text node morphedNode toNode; } } else if (morphedNodeType TEXT_NODE || morphedNodeType COMMENT_NODE) { // Text or comment node if (toNodeType morphedNodeType) { if (morphedNode.nodeValue ! toNode.nodeValue) { morphedNode.nodeValue toNode.nodeValue; } return morphedNode; } else { // Text node to something else morphedNode toNode; } } } if (morphedNode toNode) { // The to node was not compatible with the from node so we had to // toss out the from node and use the to node onNodeDiscarded(fromNode); } else { if (toNode.isSameNode && toNode.isSameNode(morphedNode)) { return; } morphEl(morphedNode, toNode, childrenOnly); // We now need to loop over any keyed nodes that might need to be // removed. We only do the removal if we know that the keyed node // never found a match. When a keyed node is matched up we remove // it out of fromNodesLookup and we use fromNodesLookup to determine // if a keyed node has been matched up or not if (keyedRemovalList) { for (var i0, lenkeyedRemovalList.length; ilen; i++) { var elToRemove fromNodesLookupkeyedRemovalListi; if (elToRemove) { removeNode(elToRemove, elToRemove.parentNode, false); } } } } if (!childrenOnly && morphedNode ! fromNode && fromNode.parentNode) { if (morphedNode.actualize) { morphedNode morphedNode.actualize(fromNode.ownerDocument || doc); } // If we had to swap out the from node with a new node because the old // node was not compatible with the target node then we need to // replace the old DOM node in the original DOM tree. This is only // possible if the original DOM node was part of a DOM tree which // we know is the case if it has a parent node. fromNode.parentNode.replaceChild(morphedNode, fromNode); } return morphedNode; }; } var morphdom morphdomFactory(morphAttrs); return morphdom;}));use strict;/*\|*||*| :: Number.isInteger() polyfill ::|*||*| https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger|*|\*/if (!Number.isInteger) { Number.isInteger function isInteger (nVal) { return typeof nVal number && isFinite(nVal) && nVal > -9007199254740992 && nVal 9007199254740992 && Math.floor(nVal) nVal; };}/*\|*||*| StringView - Mozilla Developer Network|*||*| Revision #12, March 21st, 2017|*||*| https://developer.mozilla.org/en-US/Add-ons/Code_snippets/StringView|*| https://developer.mozilla.org/en-US/docs/User:fusionchess|*| https://github.com/madmurphy/stringview.js|*||*| This framework is released under the GNU Lesser General Public License, version 3 or later.|*| http://www.gnu.org/licenses/lgpl-3.0.html|*|\*/function StringView (vInput, sEncoding /* optional (default: UTF-8) */, nOffset /* optional */, nLength /* optional */) { var fTAView, aWhole, aRaw, fPutOutptCode, fGetOutptChrSize, nInptLen, nStartIdx isFinite(nOffset) ? nOffset : 0, nTranscrType 15; if (sEncoding) { this.encoding sEncoding.toString(); } encSwitch: switch (this.encoding) { case UTF-8: fPutOutptCode StringView.putUTF8CharCode; fGetOutptChrSize StringView.getUTF8CharLength; fTAView Uint8Array; break encSwitch; case UTF-16: fPutOutptCode StringView.putUTF16CharCode; fGetOutptChrSize StringView.getUTF16CharLength; fTAView Uint16Array; break encSwitch; case UTF-32: fTAView Uint32Array; nTranscrType & 14; break encSwitch; default: /* case ASCII, or case BinaryString or unknown cases */ fTAView Uint8Array; nTranscrType & 14; } typeSwitch: switch (typeof vInput) { case string: /* the input argument is a primitive string: a new buffer will be created. */ nTranscrType & 7; break typeSwitch; case object: classSwitch: switch (vInput.constructor) { case StringView: /* the input argument is a stringView: a new buffer will be created. */ nTranscrType & 3; break typeSwitch; case String: /* the input argument is an objectified string: a new buffer will be created. */ nTranscrType & 7; break typeSwitch; case ArrayBuffer: /* the input argument is an arrayBuffer: the buffer will be shared. */ aWhole new fTAView(vInput); nInptLen this.encoding UTF-32 ? vInput.byteLength >>> 2 : this.encoding UTF-16 ? vInput.byteLength >>> 1 : vInput.byteLength; aRaw nStartIdx 0 && (!isFinite(nLength) || nLength nInptLen) ? aWhole : new fTAView(vInput, nStartIdx, !isFinite(nLength) ? nInptLen - nStartIdx : nLength); break typeSwitch; case Uint32Array: case Uint16Array: case Uint8Array: /* the input argument is a typedArray: the buffer, and possibly the array itself, will be shared. */ fTAView vInput.constructor; nInptLen vInput.length; aWhole vInput.byteOffset 0 && vInput.length ( fTAView Uint32Array ? vInput.buffer.byteLength >>> 2 : fTAView Uint16Array ? vInput.buffer.byteLength >>> 1 : vInput.buffer.byteLength ) ? vInput : new fTAView(vInput.buffer); aRaw nStartIdx 0 && (!isFinite(nLength) || nLength nInptLen) ? vInput : vInput.subarray(nStartIdx, isFinite(nLength) ? nStartIdx + nLength : nInptLen); break typeSwitch; default: /* the input argument is an array or another serializable object: a new typedArray will be created. */ aWhole new fTAView(vInput); nInptLen aWhole.length; aRaw nStartIdx 0 && (!isFinite(nLength) || nLength nInptLen) ? aWhole : aWhole.subarray(nStartIdx, isFinite(nLength) ? nStartIdx + nLength : nInptLen); } break typeSwitch; default: /* the input argument is a number, a boolean or a function: a new typedArray will be created. */ aWhole aRaw new fTAView(Number(vInput) || 0); } if (nTranscrType 8) { var vSource, nOutptLen, nCharStart, nCharEnd, nEndIdx, fGetInptChrSize, fGetInptChrCode; if (nTranscrType & 4) { /* input is string */ vSource vInput; nOutptLen nInptLen vSource.length; nTranscrType ^ this.encoding UTF-32 ? 0 : 2; /* ...or...: nTranscrType ^ Number(this.encoding ! UTF-32) 1; */ nStartIdx nCharStart nOffset ? Math.max((nOutptLen + nOffset) % nOutptLen, 0) : 0; nEndIdx nCharEnd (Number.isInteger(nLength) ? Math.min(Math.max(nLength, 0) + nStartIdx, nOutptLen) : nOutptLen) - 1; } else { /* input is stringView */ vSource vInput.rawData; nInptLen vInput.makeIndex(); nStartIdx nCharStart nOffset ? Math.max((nInptLen + nOffset) % nInptLen, 0) : 0; nOutptLen Number.isInteger(nLength) ? Math.min(Math.max(nLength, 0), nInptLen - nCharStart) : nInptLen; nEndIdx nCharEnd nOutptLen + nCharStart; if (vInput.encoding UTF-8) { fGetInptChrSize StringView.getUTF8CharLength; fGetInptChrCode StringView.loadUTF8CharCode; } else if (vInput.encoding UTF-16) { fGetInptChrSize StringView.getUTF16CharLength; fGetInptChrCode StringView.loadUTF16CharCode; } else { nTranscrType & 1; } } if (nOutptLen 0 || nTranscrType 4 && vSource.encoding this.encoding && nCharStart 0 && nOutptLen nInptLen) { /* the encoding is the same, the length too and the offset is 0... or the input is empty! */ nTranscrType 7; } conversionSwitch: switch (nTranscrType) { case 0: /* both the source and the new StringView have a fixed-length encoding... */ aWhole new fTAView(nOutptLen); for (var nOutptIdx 0; nOutptIdx nOutptLen; aWholenOutptIdx vSourcenStartIdx + nOutptIdx++); break conversionSwitch; case 1: /* the source has a fixed-length encoding but the new StringView has a variable-length encoding... */ /* mapping... */ nOutptLen 0; for (var nInptIdx nStartIdx; nInptIdx nEndIdx; nInptIdx++) { nOutptLen + fGetOutptChrSize(vSourcenInptIdx); } aWhole new fTAView(nOutptLen); /* transcription of the source... */ for (var nInptIdx nStartIdx, nOutptIdx 0; nOutptIdx nOutptLen; nInptIdx++) { nOutptIdx fPutOutptCode(aWhole, vSourcenInptIdx, nOutptIdx); } break conversionSwitch; case 2: /* the source has a variable-length encoding but the new StringView has a fixed-length encoding... */ /* mapping... */ nStartIdx 0; var nChrCode; for (nChrIdx 0; nChrIdx nCharStart; nChrIdx++) { nChrCode fGetInptChrCode(vSource, nStartIdx); nStartIdx + fGetInptChrSize(nChrCode); } aWhole new fTAView(nOutptLen); /* transcription of the source... */ for (var nInptIdx nStartIdx, nOutptIdx 0; nOutptIdx nOutptLen; nInptIdx + fGetInptChrSize(nChrCode), nOutptIdx++) { nChrCode fGetInptChrCode(vSource, nInptIdx); aWholenOutptIdx nChrCode; } break conversionSwitch; case 3: /* both the source and the new StringView have a variable-length encoding... */ /* mapping... */ nOutptLen 0; var nChrCode; for (var nChrIdx 0, nInptIdx 0; nChrIdx nCharEnd; nInptIdx + fGetInptChrSize(nChrCode)) { nChrCode fGetInptChrCode(vSource, nInptIdx); if (nChrIdx nCharStart) { nStartIdx nInptIdx; } if (++nChrIdx > nCharStart) { nOutptLen + fGetOutptChrSize(nChrCode); } } aWhole new fTAView(nOutptLen); /* transcription... */ for (var nInptIdx nStartIdx, nOutptIdx 0; nOutptIdx nOutptLen; nInptIdx + fGetInptChrSize(nChrCode)) { nChrCode fGetInptChrCode(vSource, nInptIdx); nOutptIdx fPutOutptCode(aWhole, nChrCode, nOutptIdx); } break conversionSwitch; case 4: /* DOMString to ASCII or BinaryString or other unknown encodings */ aWhole new fTAView(nOutptLen); /* transcription... */ for (var nIdx 0; nIdx nOutptLen; nIdx++) { aWholenIdx vSource.charCodeAt(nIdx) & 0xff; } break conversionSwitch; case 5: /* DOMString to UTF-8 or to UTF-16 */ /* mapping... */ nOutptLen 0; for (var nMapIdx 0; nMapIdx nInptLen; nMapIdx++) { if (nMapIdx nCharStart) { nStartIdx nOutptLen; } nOutptLen + fGetOutptChrSize(vSource.charCodeAt(nMapIdx)); if (nMapIdx nCharEnd) { nEndIdx nOutptLen; } } aWhole new fTAView(nOutptLen); /* transcription... */ for (var nOutptIdx 0, nChrIdx 0; nOutptIdx nOutptLen; nChrIdx++) { nOutptIdx fPutOutptCode(aWhole, vSource.charCodeAt(nChrIdx), nOutptIdx); } break conversionSwitch; case 6: /* DOMString to UTF-32 */ aWhole new fTAView(nOutptLen); /* transcription... */ for (var nIdx 0; nIdx nOutptLen; nIdx++) { aWholenIdx vSource.charCodeAt(nIdx); } break conversionSwitch; case 7: aWhole new fTAView(nOutptLen ? vSource : 0); break conversionSwitch; } aRaw nTranscrType > 3 && (nStartIdx > 0 || nEndIdx aWhole.length - 1) ? aWhole.subarray(nStartIdx, nEndIdx) : aWhole; } this.buffer aWhole.buffer; this.bufferView aWhole; this.rawData aRaw; Object.freeze(this);}/* CONSTRUCTORS METHODS */StringView.loadUTF8CharCode function (aChars, nIdx) { /* The ISO 10646 view of UTF-8 considers valid codepoints encoded by 1-6 bytes, * while the Unicode view of UTF-8 in 2003 has limited them to 1-4 bytes in order to * match UTF-16s codepoints. In front of a 5/6-byte sequence StringView tries to * encode it in any case. */ var nLen aChars.length, nPart aCharsnIdx; return nPart > 251 && nPart 254 && nIdx + 5 nLen ? /* (nPart - 252 30) may be not safe in ECMAScript! So...: */ /* six bytes */ (nPart - 252) * 1073741824 + (aCharsnIdx + 1 - 128 24) + (aCharsnIdx + 2 - 128 18) + (aCharsnIdx + 3 - 128 12) + (aCharsnIdx + 4 - 128 6) + aCharsnIdx + 5 - 128 : nPart > 247 && nPart 252 && nIdx + 4 nLen ? /* five bytes */ (nPart - 248 24) + (aCharsnIdx + 1 - 128 18) + (aCharsnIdx + 2 - 128 12) + (aCharsnIdx + 3 - 128 6) + aCharsnIdx + 4 - 128 : nPart > 239 && nPart 248 && nIdx + 3 nLen ? /* four bytes */(nPart - 240 18) + (aCharsnIdx + 1 - 128 12) + (aCharsnIdx + 2 - 128 6) + aCharsnIdx + 3 - 128 : nPart > 223 && nPart 240 && nIdx + 2 nLen ? /* three bytes */ (nPart - 224 12) + (aCharsnIdx + 1 - 128 6) + aCharsnIdx + 2 - 128 : nPart > 191 && nPart 224 && nIdx + 1 nLen ? /* two bytes */ (nPart - 192 6) + aCharsnIdx + 1 - 128 : /* one byte */ nPart;};StringView.putUTF8CharCode function (aTarget, nChar, nPutAt) { var nIdx nPutAt; if (nChar 0x80 /* 128 */) { /* one byte */ aTargetnIdx++ nChar; } else if (nChar 0x800 /* 2048 */) { /* two bytes */ aTargetnIdx++ 0xc0 /* 192 */ + (nChar >>> 6); aTargetnIdx++ 0x80 /* 128 */ + (nChar & 0x3f /* 63 */); } else if (nChar 0x10000 /* 65536 */) { /* three bytes */ aTargetnIdx++ 0xe0 /* 224 */ + (nChar >>> 12); aTargetnIdx++ 0x80 /* 128 */ + ((nChar >>> 6) & 0x3f /* 63 */); aTargetnIdx++ 0x80 /* 128 */ + (nChar & 0x3f /* 63 */); } else if (nChar 0x200000 /* 2097152 */) { /* four bytes */ aTargetnIdx++ 0xf0 /* 240 */ + (nChar >>> 18); aTargetnIdx++ 0x80 /* 128 */ + ((nChar >>> 12) & 0x3f /* 63 */); aTargetnIdx++ 0x80 /* 128 */ + ((nChar >>> 6) & 0x3f /* 63 */); aTargetnIdx++ 0x80 /* 128 */ + (nChar & 0x3f /* 63 */); } else if (nChar 0x4000000 /* 67108864 */) { /* five bytes */ aTargetnIdx++ 0xf8 /* 248 */ + (nChar >>> 24); aTargetnIdx++ 0x80 /* 128 */ + ((nChar >>> 18) & 0x3f /* 63 */); aTargetnIdx++ 0x80 /* 128 */ + ((nChar >>> 12) & 0x3f /* 63 */); aTargetnIdx++ 0x80 /* 128 */ + ((nChar >>> 6) & 0x3f /* 63 */); aTargetnIdx++ 0x80 /* 128 */ + (nChar & 0x3f /* 63 */); } else /* if (nChar 0x7fffffff) */ { /* 2147483647 */ /* six bytes */ aTargetnIdx++ 0xfc /* 252 */ + /* (nChar >>> 30) may be not safe in ECMAScript! So...: */ (nChar / 1073741824); aTargetnIdx++ 0x80 /* 128 */ + ((nChar >>> 24) & 0x3f /* 63 */); aTargetnIdx++ 0x80 /* 128 */ + ((nChar >>> 18) & 0x3f /* 63 */); aTargetnIdx++ 0x80 /* 128 */ + ((nChar >>> 12) & 0x3f /* 63 */); aTargetnIdx++ 0x80 /* 128 */ + ((nChar >>> 6) & 0x3f /* 63 */); aTargetnIdx++ 0x80 /* 128 */ + (nChar & 0x3f /* 63 */); } return nIdx;};StringView.getUTF8CharLength function (nChar) { return nChar 0x80 ? 1 : nChar 0x800 ? 2 : nChar 0x10000 ? 3 : nChar 0x200000 ? 4 : nChar 0x4000000 ? 5 : 6;};StringView.loadUTF16CharCode function (aChars, nIdx) { /* UTF-16 to DOMString decoding algorithm */ var nFrstChr aCharsnIdx; return nFrstChr > 0xD7BF /* 55231 */ && nIdx + 1 aChars.length ? (nFrstChr - 0xD800 /* 55296 */ 10) + aCharsnIdx + 1 + 0x2400 /* 9216 */ : nFrstChr;};StringView.putUTF16CharCode function (aTarget, nChar, nPutAt) { var nIdx nPutAt; if (nChar 0x10000 /* 65536 */) { /* one element */ aTargetnIdx++ nChar; } else { /* two elements */ aTargetnIdx++ 0xD7C0 /* 55232 */ + (nChar >>> 10); aTargetnIdx++ 0xDC00 /* 56320 */ + (nChar & 0x3FF /* 1023 */); } return nIdx;};StringView.getUTF16CharLength function (nChar) { return nChar 0x10000 ? 1 : 2;};/* Array of bytes to base64 string decoding */StringView.b64ToUint6 function (nChr) { return nChr > 64 && nChr 91 ? nChr - 65 : nChr > 96 && nChr 123 ? nChr - 71 : nChr > 47 && nChr 58 ? nChr + 4 : nChr 43 ? 62 : nChr 47 ? 63 : 0;};StringView.uint6ToB64 function (nUint6) { return nUint6 26 ? nUint6 + 65 : nUint6 52 ? nUint6 + 71 : nUint6 62 ? nUint6 - 4 : nUint6 62 ? 43 : nUint6 63 ? 47 : 65;};/* Base64 string to array encoding */StringView.bytesToBase64 function (aBytes) { var eqLen (3 - (aBytes.length % 3)) % 3, sB64Enc ; for (var nMod3, nLen aBytes.length, nUint24 0, nIdx 0; nIdx nLen; nIdx++) { nMod3 nIdx % 3; /* Uncomment the following line in order to split the output in lines 76-character long: */ /* if (nIdx > 0 && (nIdx * 4 / 3) % 76 0) { sB64Enc + \r\n; } */ nUint24 | aBytesnIdx (16 >>> nMod3 & 24); if (nMod3 2 || aBytes.length - nIdx 1) { sB64Enc + String.fromCharCode(StringView.uint6ToB64(nUint24 >>> 18 & 63), StringView.uint6ToB64(nUint24 >>> 12 & 63), StringView.uint6ToB64(nUint24 >>> 6 & 63), StringView.uint6ToB64(nUint24 & 63)); nUint24 0; } } return eqLen 0 ? sB64Enc : sB64Enc.substring(0, sB64Enc.length - eqLen) + (eqLen 1 ? : );};StringView.base64ToBytes function (sBase64, nBlockBytes) { var sB64Enc sBase64.replace(/^A-Za-z0-9\+\//g, ), nInLen sB64Enc.length, nOutLen nBlockBytes ? Math.ceil((nInLen * 3 + 1 >>> 2) / nBlockBytes) * nBlockBytes : nInLen * 3 + 1 >>> 2, aBytes new Uint8Array(nOutLen); for (var nMod3, nMod4, nUint24 0, nOutIdx 0, nInIdx 0; nInIdx nInLen; nInIdx++) { nMod4 nInIdx & 3; nUint24 | StringView.b64ToUint6(sB64Enc.charCodeAt(nInIdx)) 18 - 6 * nMod4; if (nMod4 3 || nInLen - nInIdx 1) { for (nMod3 0; nMod3 3 && nOutIdx nOutLen; nMod3++, nOutIdx++) { aBytesnOutIdx nUint24 >>> (16 >>> nMod3 & 24) & 255; } nUint24 0; } } return aBytes;};StringView.makeFromBase64 function (sB64Inpt, sEncoding, nByteOffset, nLength) { return new StringView(sEncoding UTF-16 || sEncoding UTF-32 ? StringView.base64ToBytes(sB64Inpt, sEncoding UTF-16 ? 2 : 4).buffer : StringView.base64ToBytes(sB64Inpt), sEncoding, nByteOffset, nLength);};/* DEFAULT VALUES */StringView.prototype.encoding UTF-8; /* Default encoding... *//* INSTANCES METHODS */StringView.prototype.makeIndex function (nChrLength, nStartFrom) { var aTarget this.rawData, nChrEnd, nRawLength aTarget.length, nStartIdx nStartFrom || 0, nIdxEnd nStartIdx, nStopAtChr isNaN(nChrLength) ? Infinity : nChrLength; if (nChrLength + 1 > aTarget.length) { throw new RangeError(StringView.prototype.makeIndex - The offset can\t be major than the length of the array - 1.); } switch (this.encoding) { case UTF-8: var nPart; for (nChrEnd 0; nIdxEnd nRawLength && nChrEnd nStopAtChr; nChrEnd++) { nPart aTargetnIdxEnd; nIdxEnd + nPart > 251 && nPart 254 && nIdxEnd + 5 nRawLength ? 6 : nPart > 247 && nPart 252 && nIdxEnd + 4 nRawLength ? 5 : nPart > 239 && nPart 248 && nIdxEnd + 3 nRawLength ? 4 : nPart > 223 && nPart 240 && nIdxEnd + 2 nRawLength ? 3 : nPart > 191 && nPart 224 && nIdxEnd + 1 nRawLength ? 2 : 1; } break; case UTF-16: for (nChrEnd nStartIdx; nIdxEnd nRawLength && nChrEnd nStopAtChr; nChrEnd++) { nIdxEnd + aTargetnIdxEnd > 0xD7BF /* 55231 */ && nIdxEnd + 1 aTarget.length ? 2 : 1; } break; default: nIdxEnd nChrEnd isFinite(nChrLength) ? nChrLength : nRawLength - 1; } if (nChrLength) { return nIdxEnd; } return nChrEnd;};StringView.prototype.toBase64 function (bWholeBuffer) { return StringView.bytesToBase64( bWholeBuffer ? ( this.bufferView.constructor Uint8Array ? this.bufferView : new Uint8Array(this.buffer) ) : this.rawData.constructor Uint8Array ? this.rawData : new Uint8Array(this.buffer, this.rawData.byteOffset, this.rawData.length (this.rawData.constructor Uint16Array ? 1 : 2)) );};StringView.prototype.subview function (nCharOffset /* optional */, nCharLength /* optional */) { var nRawSubLen, nRawSubOffset, nSubOffset, nSubLen, bVariableLen this.encoding UTF-8 || this.encoding UTF-16, nThisLen, nRawLen this.rawData.length; if (nRawLen 0) { return new StringView(this.buffer, this.encoding); } nThisLen bVariableLen ? this.makeIndex() : nRawLen; nSubOffset nCharOffset ? nCharOffset + 1 > nThisLen ? nThisLen : Math.max((nThisLen + nCharOffset) % nThisLen, 0) : 0; nSubLen Number.isInteger(nCharLength) ? Math.max(nCharLength, 0) + nSubOffset > nThisLen ? nThisLen - nSubOffset : nCharLength : nThisLen - nSubOffset; if (nSubOffset 0 && nSubLen nThisLen) { return this; } if (bVariableLen) { nRawSubOffset nSubOffset nThisLen ? this.makeIndex(nSubOffset) : nThisLen; nRawSubLen nSubLen ? this.makeIndex(nSubLen, nRawSubOffset) - nRawSubOffset : 0; } else { nRawSubOffset nSubOffset; nRawSubLen nSubLen; } if (this.encoding UTF-16) { nRawSubOffset 1; } else if (this.encoding UTF-32) { nRawSubOffset 2; } return new StringView(this.buffer, this.encoding, this.rawData.byteOffset + nRawSubOffset, nRawSubLen);};StringView.prototype.forEachChar function (fCallback, oThat, nChrOffset, nChrLen) { var aSource this.rawData, nRawEnd, nRawIdx; if (this.encoding UTF-8 || this.encoding UTF-16) { var fGetInptChrSize, fGetInptChrCode; if (this.encoding UTF-8) { fGetInptChrSize StringView.getUTF8CharLength; fGetInptChrCode StringView.loadUTF8CharCode; } else if (this.encoding UTF-16) { fGetInptChrSize StringView.getUTF16CharLength; fGetInptChrCode StringView.loadUTF16CharCode; } nRawIdx isFinite(nChrOffset) ? this.makeIndex(nChrOffset) : 0; nRawEnd isFinite(nChrLen) ? this.makeIndex(nChrLen, nRawIdx) : aSource.length; for (var nChrCode, nChrIdx 0; nRawIdx nRawEnd; nChrIdx++) { nChrCode fGetInptChrCode(aSource, nRawIdx); if (!oThat) { fCallback(nChrCode, nChrIdx, nRawIdx, aSource); } else { fCallback.call(oThat, nChrCode, nChrIdx, nRawIdx, aSource); } nRawIdx + fGetInptChrSize(nChrCode); } } else { nRawIdx isFinite(nChrOffset) ? nChrOffset : 0; nRawEnd isFinite(nChrLen) ? nChrLen + nRawIdx : aSource.length; for (nRawIdx; nRawIdx nRawEnd; nRawIdx++) { if (!oThat) { fCallback(aSourcenRawIdx, nRawIdx, nRawIdx, aSource); } else { fCallback.call(oThat, aSourcenRawIdx, nRawIdx, nRawIdx, aSource); } } }};StringView.prototype.valueOf StringView.prototype.toString function () { if (this.encoding ! UTF-8 && this.encoding ! UTF-16) { /* ASCII, UTF-32 or BinaryString to DOMString */ return String.fromCharCode.apply(null, this.rawData); } var fGetCode, fGetIncr, sView ; if (this.encoding UTF-8) { fGetIncr StringView.getUTF8CharLength; fGetCode StringView.loadUTF8CharCode; } else if (this.encoding UTF-16) { fGetIncr StringView.getUTF16CharLength; fGetCode StringView.loadUTF16CharCode; } for (var nChr, nLen this.rawData.length, nIdx 0; nIdx nLen; nIdx + fGetIncr(nChr)) { nChr fGetCode(this.rawData, nIdx); sView + String.fromCharCode(nChr); } return sView;};/* */var textEncoder new TextEncoder();var splitScreen split-screen;var wsHtmlUrl ((window.location.protocol https: ? wss : ws) + :// + window.location.host + /ws-html);var wsMsgpackUrl ((window.location.protocol https: ? wss : ws) + :// + window.location.host + /ws-msgpack);function download(filename, text) { var element document.createElement(a); element.setAttribute(href, data:text/plain;charsetutf-8, + encodeURIComponent(UTF8ToString(text))); element.setAttribute(download, UTF8ToString(filename)); element.style.display none; document.body.appendChild(element); element.click(); document.body.removeChild(element);}function byteLength(str) { // returns the byte length of an utf8 string var s str.length; for (var istr.length-1; i>0; i--) { var code str.charCodeAt(i); if (code > 0x7f && code 0x7ff) s++; else if (code > 0x7ff && code 0xffff) s+2; if (code > 0xDC00 && code 0xDFFF) i--; //trail surrogate } return s;}window.startConnection function(mrbPointer, callbackPointer) { if (windowWebSocket) { window.conn new WebSocket(wsMsgpackUrl); window.conn.binaryType arraybuffer; //window.fit new FitAddon(); //window.addEventListener(resize, function(resizeEvent) { // window.fit.fit(); //}); //window.terminal new Terminal(); //window.terminal.loadAddon(window.fit); //window.terminal.onKey(function(event) { // // put the keycode you copied from the console // if (window.terminal.hasSelection() && event.key \u0003) { // return document.execCommand(copy); // } else if (event.key \u0016) { // throw paste-event-bug, snafu; // } //}); //window.terminal.onData(function(termInputData) { // ///////let encIn textEncoder.encode(termInputData); // ///////console.log(termInputData); // ///////var ptr allocate(intArrayFromString(encIn), ALLOC_NORMAL); // ///////window.pack_outbound_tty(mrbPointer, callbackPointer, ptr, encIn.length); // ///// //var buf new ArrayBuffer(termInputData.length); // ///// //var bufView new Uint8Array(buf); // ///// //for (var i0; i length; i++) { // ///// // var ic Module.getValue(bytes + (i), i8); // ///// // bufViewi ic; // ///// //} // ///// //window.terminal.write(bufView); // ///////var s 😀; // ///////window.terminal.write(s); // ///////var ptr allocate(new Uint8Array(s), ALLOC_NORMAL); // ///////console.log(byteLength(s), s.length); // window.pack_outbound_tty(mrbPointer, callbackPointer, termInputData); //}); document.body.addEventListener(paste, (event) > { //TODO: !!! let paste (event.clipboardData || window.clipboardData).getData(text); console.log(paste); //let encPaste textEncoder.encode(paste); //var ptr allocate(intArrayFromString(encPaste), ALLOC_NORMAL); //console.log(wtf paste event, event, byteLength(paste), encPaste.length, paste.length); //window.pack_outbound_tty(mrbPointer, callbackPointer, ptr, byteLength(paste)); }); //window.terminal.onResize(function(newSize) { // window.resize_tty(mrbPointer, callbackPointer, graphicsContainer.offsetWidth, graphicsContainer.offsetHeight, newSize.rows, newSize.cols); //}); //window.terminal.open(terminalContainer); window.conn.onopen function (event) { //window.fit.fit(); window.onbeforeunload function() { window.conn.onclose function () {}; window.conn.close(); }; var ptr allocate(intArrayFromString(window.location.pathname), ALLOC_NORMAL); window.socket_connected(mrbPointer, callbackPointer, ptr, window.location.pathname.length); }; window.conn.onclose function (event) { console.log(Connection closed.); }; window.conn.onmessage function (event) { //console.log(FOOO got message from server, event); var origData event.data; var typedData new Uint8Array(origData); var heapBuffer Module._malloc(origData.byteLength * typedData.BYTES_PER_ELEMENT); Module.HEAPU8.set(typedData, heapBuffer); window.handle_js_websocket_event(mrbPointer, callbackPointer, heapBuffer, origData.byteLength); Module._free(heapBuffer); return 0; }; return addFunction(function(channel, bytes, length) { //IMPL: write_packed_pointer switch(channel) { case 0: //TODO //var buf new ArrayBuffer(length); //var bufView new Uint8Array(buf); //for (var i0; i length; i++) { // var ic Module.getValue(bytes + (i), i8); // bufViewi ic; //} //window.terminal.write(bufView); break; case 1: var buf new ArrayBuffer(length); var bufView new Uint8Array(buf); for (var i0; i length; i++) { var ic Module.getValue(bytes + (i), i8); bufViewi ic; } window.conn.send(bufView); break; } }, viii); } else { console.log(Your browser does not support WebSockets.); }};var graphicsContainer document.getElementById(canvas);//var terminalContainer document.getElementById(wkndr-terminal);if (graphicsContainer) { // As a default initial behavior, pop up an alert when webgl context is lost. To make your // application robust, you may want to override this behavior before shipping! // See http://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15.2 graphicsContainer.addEventListener(webglcontextlost, function(e) { alert(WebGL context lost. You will need to reload the page.); e.preventDefault(); }, false); var Module { arguments: --no-server, --client + graphicsContainer.offsetWidth.toString() + x + graphicsContainer.offsetHeight.toString(), preRun: (function() { window.handle_js_websocket_event Module.cwrap( handle_js_websocket_event, number, number, number, number, number ); window.pack_outbound_tty Module.cwrap( pack_outbound_tty, number, number, number, string ); window.socket_connected Module.cwrap( socket_connected, number, number, number, number, number ); window.resize_tty Module.cwrap( resize_tty, number, number, number, number, number, number, number ); GLFW.exitFullscreen function() { //TODO: replace hack later }; }), postRun: , print: function(text) { if (arguments.length > 1) text Array.prototype.slice.call(arguments).join( ); console.log(text); }, printErr: function(text) { if (arguments.length > 1) text Array.prototype.slice.call(arguments).join( ); console.error(text); }, canvas: (function() { return graphicsContainer; })(), setStatus: function(text) { if (!Module.setStatus.last) Module.setStatus.last { time: Date.now(), text: }; if (text Module.setStatus.text) return; }, totalDependencies: 0, monitorRunDependencies: function(left) { this.totalDependencies Math.max(this.totalDependencies, left); Module.setStatus(left ? Preparing... ( + (this.totalDependencies-left) + / + this.totalDependencies + ) : All downloads complete.); } }; //window.onerror function(event) { // Module.setStatus(Exception thrown, see JavaScript console); // Module.setStatus function(text) { // if (text) Module.printErr(post-exception status + text); // }; //}; Module.setStatus(Downloading...);}window.startLiveConnection function() { if (windowWebSocket) { window.conn new WebSocket(wsHtmlUrl); window.conn.onopen function (event) { //this is hypertext app port //let initialBits JSON.stringify({ // party: window.location.pathname //}); //let sent window.conn.send(initialBits); console.log(connected, event); }; window.conn.onclose function (event) { console.log(Connection closed.); }; window.conn.onmessage function (event) { var origDataJson event.data; Array.from(document.getElementsByClassName(wkndr-live-container)).forEach(function(liveContainer, index) { var origData JSON.parse(origDataJson); morphdom(liveContainer.childNodes0, origDatafoo, { onBeforeElUpdated: function(fromEl, toEl) { if (toEl.tagName INPUT) { if (fromEl.checked) { toEl.checked fromEl.checked; } else { toEl.value fromEl.value; } } }, onNodeAdded: function(node) { if (node.nodeName SCRIPT && node.src) { var script document.createElement(script); script.src node.src; node.replaceWith(script) } return true; } }); }); }; } else { console.log(Your browser does not support WebSockets.); }};startLiveConnection();console.log(WTF!!!);/script>script asyncasync srcwkndr.js>/script>/body>/html>
View on OTX
|
View on ThreatMiner
Please enable JavaScript to view the
comments powered by Disqus.
Data with thanks to
AlienVault OTX
,
VirusTotal
,
Malwr
and
others
. [
Sitemap
]