Software: Apache. PHP/8.1.30 uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root) Safe-mode: OFF (not secure) /usr/share/nodejs/jsdom/lib/jsdom/living/xhr/ drwxr-xr-x |
Viewing file: Select action/file-type: "use strict"; /* eslint-disable no-process-exit */ const util = require("util"); const { JSDOM } = require("../../../.."); const { READY_STATES } = require("./xhr-utils"); const idlUtils = require("../generated/utils"); const tough = require("tough-cookie"); const dom = new JSDOM(); const xhr = new dom.window.XMLHttpRequest(); const xhrImpl = idlUtils.implForWrapper(xhr); const chunks = []; process.stdin.on("data", chunk => { chunks.push(chunk); }); process.stdin.on("end", () => { const buffer = Buffer.concat(chunks); const flag = JSON.parse(buffer.toString()); if (flag.body && flag.body.type === "Buffer" && flag.body.data) { flag.body = Buffer.from(flag.body.data); } if (flag.cookieJar) { flag.cookieJar = tough.CookieJar.fromJSON(flag.cookieJar); } flag.synchronous = false; Object.assign(xhrImpl.flag, flag); const { properties } = xhrImpl; xhrImpl.readyState = READY_STATES.OPENED; try { xhr.addEventListener("loadend", () => { if (properties.error) { properties.error = properties.error.stack || util.inspect(properties.error); } process.stdout.write(JSON.stringify({ responseURL: xhrImpl.responseURL, status: xhrImpl.status, statusText: xhrImpl.statusText, properties }), () => { process.exit(0); }); }, false); xhr.send(flag.body); } catch (error) { properties.error += error.stack || util.inspect(error); process.stdout.write(JSON.stringify({ responseURL: xhrImpl.responseURL, status: xhrImpl.status, statusText: xhrImpl.statusText, properties }), () => { process.exit(0); }); } }); |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0035 ]-- |