Render payload command responses with Mythic 4.0 browser scripts.
Browser scripts are JavaScript response renderers. A payload type can register a default renderer with a command, and each operator can enable, disable, or customize their own copy in Mythic.
Store the referenced JavaScript in the payload type’s browser_scripts directory. An operator-created script is useful for experimentation, but register the final script with the payload type if it should survive a new database and be distributed to other operators.
Mythic calls the script with the current task object and an array of response strings. Return an object containing one or more supported top-level keys.
Run error handling before parsing structured output. Responses can arrive incrementally, so the function must also tolerate a partially completed task and incomplete application-level data.
The operator can switch plain output among raw text, formatted JSON, Markdown, and xterm-based terminal rendering. A browser script does not need to implement ANSI or Markdown rendering itself.
Table cells support plaintext plus the current copy, tasking-button, style, and value formats exposed by the UI. Keep raw agent values in the row so sorting and filtering remain useful.
Use media for downloaded files, screenshots, text, hex, and SQLite previews. Mythic looks up the file record by agent_file_id and adds Bearer authentication to preview and download requests.
Set editable: true only for a workflow that intentionally permits changing the Mythic-side file record. The interactive remote file-editor protocol is a separate task-response feature.
Return graph when nodes and edges communicate the result more clearly than rows. Graph definitions can supply nodes directly or build them from browser-script elements and can include layout/view configuration. Validate graph output in the script editor’s preview because invalid node or edge references cannot be rendered.
Table cells can issue additional tasking. Pass the command, callback context, and parameter value required by the target action instead of constructing direct API requests in the browser script. Use supported UI features where possible so the same action remains available outside the custom renderer.
The legacy top-level screenshot, download, and search result keys were removed in Mythic 4.0.
Convert screenshot/download output to media; convert search links to current table/tasking controls or ordinary supported output.
Browser scripts that fetch protected routes must use the UI’s authenticated mechanisms because the mythic cookie is no longer accepted.
Test each migrated script against completed, partially completed, error, empty, and multi-response tasks. The Browser Scripts editor can preview a script against matching task output from the current operation.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Mythic","colors":{"primary":"#6D70A7","light":"#50B071","dark":"#6D70A7"},"logo":{"light":"https://mintcdn.com/specterops-3/3s2YOrygh-Ut9KJD/logo/mythic.png?fit=max\u0026auto=format\u0026n=3s2YOrygh-Ut9KJD\u0026q=85\u0026s=9dc129a1531ec4f44de0b0e79ad03679","dark":"https://mintcdn.com/specterops-3/3s2YOrygh-Ut9KJD/logo/mythic.png?fit=max\u0026auto=format\u0026n=3s2YOrygh-Ut9KJD\u0026q=85\u0026s=9dc129a1531ec4f44de0b0e79ad03679","href":"https://docs.mythic-c2.net/"},"favicon":"https://mintcdn.com/specterops-3/I6wn8nE0SX0nqRFZ/favicon.png?fit=max\u0026auto=format\u0026n=I6wn8nE0SX0nqRFZ\u0026q=85\u0026s=20b11a663bf17cfc5bedb978b1f77b77","appearance":{"default":"dark"},"background":{"decoration":"windows"},"navbar":{"links":[{"href":"https://github.com/its-a-feature/Mythic","label":"Get the Code"}],"primary":{"type":"button","label":"Issues","href":"https://github.com/its-a-feature/Mythic/issues"}},"footer":{"socials":{"x":"https://twitter.com/its_a_feature_","github":"https://github.com/its-a-feature/Mythic","slack":"https://slack.specterops.io"}},"fonts":{"heading":{"family":"Nunito Sans","weight":900,"source":"https://fonts.gstatic.com/s/nunitosans/v15/pe0TMImSLYBIv1o4X1M8ce2xCx3yop4tQpF_MeTm0lfGWVpNn64CL7U8upHZIbMV51Q42ptCp7t1R-s.woff2","format":"woff2"}},"styling":{"codeblocks":"system","latex":false},"integrations":{"plausible":{"domain":"docs.mythic-c2.net"}},"thumbnails":{"appearance":"dark","background":"https://mintcdn.com/specterops-3/3s2YOrygh-Ut9KJD/logo/thumbnail.png?fit=max\u0026auto=format\u0026n=3s2YOrygh-Ut9KJD\u0026q=85\u0026s=c1d77133045e590ac2a1e944608a0a37"},"navigation":{"global":{"anchors":[{"anchor":"GitHub","icon":"github","href":"https://github.com/its-a-feature/Mythic"},{"anchor":"#mythic Community","icon":"slack","href":"https://slack.specterops.io"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"specterops-3","hasAudioNarration":false,"actualSubdomain":"specterops-3","customDomains":["docs.mythic-c2.net"],"gitSource":{"type":"github","owner":"mythicmeta","repo":"mintlify_documentation","deployBranch":"primary","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a96ebe38cf6faeffe797f36","collectionId":"1e9319b1-0b78-415d-bb0b-3066e8fc4515","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6a96ebe38cf6faeffe797f36"},"feedback":{"thumbs":true,"issues":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6a96ebe38cf6faeffe797f36","clientVersion":"0.0.4044","searchFilterCounts":[{"language":"default","tag":"Development","count":153},{"language":"default","tag":"overview","count":153},{"language":"default","tag":"Documentation","count":126},{"language":"default","tag":"Overview","count":111},{"language":"default","tag":"1. Payload Type Development","count":58},{"language":"default","tag":"Operational Pieces","count":58},{"language":"default","tag":"Hooking Features","count":42},{"language":"default","tag":"2. C2 Development","count":28},{"language":"default","tag":"4. Create Tasking \u0026 Comms Format","count":22},{"language":"default","tag":"Agent Messages","count":20}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"version-4.0/customizing/payload-type-development/browser-scripting","slug":"/version-4.0/customizing/payload-type-development/browser-scripting","pageMetadata":{"title":"5. Browser Scripting","description":"Render payload command responses with Mythic 4.0 browser scripts.","href":"/version-4.0/customizing/payload-type-development/browser-scripting"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Render payload command responses with Mythic 4.0 browser scripts.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Browser scripts are JavaScript response renderers. A payload type can register a default renderer with a command, and each operator can enable, disable, or customize their own copy in Mythic.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`browser_script `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` BrowserScript(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`script_name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"process_list\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`author`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"@operator\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Store the referenced JavaScript in the payload type’s `,_jsx(_components.code,{children:`browser_scripts`}),` directory. An operator-created script is useful for experimentation, but register the final script with the payload type if it should survive a new database and be distributed to other operators.`]}),`\n`,_jsx(Heading,{level:`2`,id:`function-contract`,children:`Function contract`}),`\n`,_jsx(_components.p,{children:`Mythic calls the script with the current task object and an array of response strings. Return an object containing one or more supported top-level keys.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`31`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`31`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`task`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`responses`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`task`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`status`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`toLowerCase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`includes`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`plaintext:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` responses`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`join`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) };`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` parsed`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` responses`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`flatMap`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`((`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` try`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` value`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`parse`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Array`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`isArray`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`?`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` value`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` :`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`];`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [];`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` plaintext:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`parsed`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:`length`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" process records`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` table:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` title:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Processes\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`plaintext:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"string\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`fillWidth:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`plaintext:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"pid\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"number\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`width:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 120`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`plaintext:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"string\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`width:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 220`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` rows:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` parsed`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`map`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`((`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`item`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` name:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`plaintext:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` item`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` pid:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`plaintext:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` item`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`pid`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` user:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`plaintext:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` item`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`user`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }))`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` };`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Run error handling before parsing structured output. Responses can arrive incrementally, so the function must also tolerate a partially completed task and incomplete application-level data.`}),`\n`,_jsx(Heading,{level:`2`,id:`supported-output`,children:`Supported output`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Key`}),_jsx(_components.th,{children:`Shape`}),_jsx(_components.th,{children:`Purpose`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`plaintext`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Render text with plaintext, JSON, Markdown, and terminal view options.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`table`})}),_jsx(_components.td,{children:`array of tables`}),_jsx(_components.td,{children:`Render sortable/filterable structured rows and tasking controls.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`media`})}),_jsx(_components.td,{children:`array of media objects`}),_jsx(_components.td,{children:`Preview and download Mythic file records through authenticated requests.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`graph`})}),_jsx(_components.td,{children:`graph object`}),_jsx(_components.td,{children:`Render nodes and edges for relationship output.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`tabs`})}),_jsx(_components.td,{children:`array of tab objects`}),_jsx(_components.td,{children:`Organize any supported output recursively into named tabs.`})]})]})]}),`\n`,_jsx(_components.p,{children:`The keys can be combined in one result. Unknown keys are ignored.`}),`\n`,_jsx(Heading,{level:`3`,id:`plaintext`,children:`Plaintext`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`plaintext:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` responses`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`join`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) };`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`The operator can switch plain output among raw text, formatted JSON, Markdown, and xterm-based terminal rendering. A browser script does not need to implement ANSI or Markdown rendering itself.`}),`\n`,_jsx(Heading,{level:`3`,id:`tables`,children:`Tables`}),`\n`,_jsxs(_components.p,{children:[`Each table has a `,_jsx(_components.code,{children:`title`}),`, `,_jsx(_components.code,{children:`headers`}),`, and `,_jsx(_components.code,{children:`rows`}),`. A header’s `,_jsx(_components.code,{children:`plaintext`}),` is also the key used to find its cell in each row.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`15`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`15`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` table:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` title:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Network Connections\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`plaintext:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"remote\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"string\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`fillWidth:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`plaintext:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"port\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"number\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`width:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 100`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`plaintext:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"state\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"string\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`width:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 140`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` rows:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` connections`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`map`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`((`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`connection`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` remote:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`plaintext:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` connection`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`remote`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` port:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`plaintext:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` connection`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`port`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` state:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`plaintext:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` connection`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`state`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }))`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`};`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Table cells support plaintext plus the current copy, tasking-button, style, and value formats exposed by the UI. Keep raw agent values in the row so sorting and filtering remain useful.`}),`\n`,_jsx(Heading,{level:`3`,id:`media`,children:`Media`}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`media`}),` for downloaded files, screenshots, text, hex, and SQLite previews. Mythic looks up the file record by `,_jsx(_components.code,{children:`agent_file_id`}),` and adds Bearer authentication to preview and download requests.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` media:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` agent_file_id:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`file_id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` filename:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`filename`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` editable:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` false`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`};`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Set `,_jsx(_components.code,{children:`editable: true`}),` only for a workflow that intentionally permits changing the Mythic-side file record. The interactive remote `,_jsx(_components.a,{href:`/version-4.0/customizing/payload-type-development/create_tasking/agent-side-coding/file-editor-protocol`,children:`file-editor protocol`}),` is a separate task-response feature.`]}),`\n`,_jsx(Heading,{level:`3`,id:`tabs`,children:`Tabs`}),`\n`,_jsxs(_components.p,{children:[`Each tab has a `,_jsx(_components.code,{children:`title`}),` and `,_jsx(_components.code,{children:`content`}),`. The content accepts the same keys as a top-level browser-script result.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` tabs:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`title:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Summary\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`content:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`plaintext:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` summary`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`title:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Records\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`content:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`table:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`recordsTable`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] } },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`title:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Artifact\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`content:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`media:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [{ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`agent_file_id:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` fileId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }] } }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`};`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`graphs`,children:`Graphs`}),`\n`,_jsxs(_components.p,{children:[`Return `,_jsx(_components.code,{children:`graph`}),` when nodes and edges communicate the result more clearly than rows. Graph definitions can supply nodes directly or build them from browser-script elements and can include layout/view configuration. Validate graph output in the script editor’s preview because invalid node or edge references cannot be rendered.`]}),`\n`,_jsx(Heading,{level:`2`,id:`tasking-buttons`,children:`Tasking buttons`}),`\n`,_jsx(_components.p,{children:`Table cells can issue additional tasking. Pass the command, callback context, and parameter value required by the target action instead of constructing direct API requests in the browser script. Use supported UI features where possible so the same action remains available outside the custom renderer.`}),`\n`,_jsx(Heading,{level:`2`,id:`removed-v4-renderers`,children:`Removed v4 renderers`}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`The legacy top-level `,_jsx(_components.code,{children:`screenshot`}),`, `,_jsx(_components.code,{children:`download`}),`, and `,_jsx(_components.code,{children:`search`}),` result keys were removed in Mythic 4.0.\nConvert screenshot/download output to `,_jsx(_components.code,{children:`media`}),`; convert search links to current table/tasking controls or ordinary supported output.\nBrowser scripts that fetch protected routes must use the UI’s authenticated mechanisms because the `,_jsx(_components.code,{children:`mythic`}),` cookie is no longer accepted.`]})}),`\n`,_jsx(_components.p,{children:`Test each migrated script against completed, partially completed, error, empty, and multi-response tasks. The Browser Scripts editor can preview a script against matching task output from the current operation.`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"system","config":{},"pageMetadata":{"title":"5. Browser Scripting","description":"Render payload command responses with Mythic 4.0 browser scripts.","href":"/version-4.0/customizing/payload-type-development/browser-scripting"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Function contract","slug":"function-contract","depth":2,"children":[]},{"title":"Supported output","slug":"supported-output","depth":2,"children":[{"title":"Plaintext","slug":"plaintext","depth":3,"children":[]},{"title":"Tables","slug":"tables","depth":3,"children":[]},{"title":"Media","slug":"media","depth":3,"children":[]},{"title":"Tabs","slug":"tabs","depth":3,"children":[]},{"title":"Graphs","slug":"graphs","depth":3,"children":[]}]},{"title":"Tasking buttons","slug":"tasking-buttons","depth":2,"children":[]},{"title":"Removed v4 renderers","slug":"removed-v4-renderers","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"specterops-3","siteName":"Mythic","title":"5. Browser Scripting - Mythic","navMaps":{"firstHrefInVersion":{"version 4.0":{"href":"/version-4.0/customizing/payload-type-development/browser-scripting","matchLevel":0},"version 3.3":{"href":"/customizing/payload-type-development/browser-scripting","matchLevel":1}},"firstHrefInLanguage":{}},"lastModified":"2026-08-03T05:40:14.747Z","originalFileLocation":"version-4.0/customizing/payload-type-development/browser-scripting.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Render payload command responses with Mythic 4.0 browser scripts.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Mythic\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/specterops-3/CtO7omxk-GskQdbQ/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/specterops-3/CtO7omxk-GskQdbQ/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/specterops-3/CtO7omxk-GskQdbQ/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/specterops-3/CtO7omxk-GskQdbQ/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/specterops-3/CtO7omxk-GskQdbQ/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/specterops-3/CtO7omxk-GskQdbQ/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/specterops-3/CtO7omxk-GskQdbQ/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/specterops-3/CtO7omxk-GskQdbQ/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/specterops-3/CtO7omxk-GskQdbQ/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"5. Browser Scripting - Mythic\">\u003cmeta data-mint-head property=\"og:description\" content=\"Render payload command responses with Mythic 4.0 browser scripts.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Mythic\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.mythic-c2.net/version-4.0/customizing/payload-type-development/browser-scripting\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://specterops-3.mintlify.app/_mintlify/api/og/v2?division=1.+Payload+Type+Development\u0026amp;title=5.+Browser+Scripting\u0026amp;description=Render+payload+command+responses+with+Mythic+4.0+browser+scripts.\u0026amp;theme=cfca8a284e14b6c3ed528a84\u0026amp;signature=d4a47aafb1eb5a7165e5e8916e1183ce10bf5dd22624c8d5dfdc03c740163518\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"5. Browser Scripting - Mythic\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Render payload command responses with Mythic 4.0 browser scripts.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://specterops-3.mintlify.app/_mintlify/api/og/v2?division=1.+Payload+Type+Development\u0026amp;title=5.+Browser+Scripting\u0026amp;description=Render+payload+command+responses+with+Mythic+4.0+browser+scripts.\u0026amp;theme=cfca8a284e14b6c3ed528a84\u0026amp;signature=d4a47aafb1eb5a7165e5e8916e1183ce10bf5dd22624c8d5dfdc03c740163518\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/specterops-3/CtO7omxk-GskQdbQ/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Mythic\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#6D70A7\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.mythic-c2.net/version-4.0/customizing/payload-type-development/browser-scripting\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/version-4.0/customizing/payload-type-development/browser-scripting.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.mythic-c2.net/#organization\",\"name\":\"Mythic\",\"url\":\"https://docs.mythic-c2.net\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/specterops-3/3s2YOrygh-Ut9KJD/logo/mythic.png?fit=max\u0026auto=format\u0026n=3s2YOrygh-Ut9KJD\u0026q=85\u0026s=9dc129a1531ec4f44de0b0e79ad03679\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.mythic-c2.net#website\",\"name\":\"Mythic\",\"url\":\"https://docs.mythic-c2.net\",\"publisher\":{\"@id\":\"https://docs.mythic-c2.net/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.mythic-c2.net/version-4.0/customizing/payload-type-development/browser-scripting#webpage\",\"url\":\"https://docs.mythic-c2.net/version-4.0/customizing/payload-type-development/browser-scripting\",\"name\":\"5. Browser Scripting\",\"description\":\"Render payload command responses with Mythic 4.0 browser scripts.\",\"dateModified\":\"2026-08-03T05:40:14.747Z\",\"isPartOf\":{\"@id\":\"https://docs.mythic-c2.net#website\"},\"breadcrumb\":{\"@id\":\"https://docs.mythic-c2.net/version-4.0/customizing/payload-type-development/browser-scripting#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.mythic-c2.net/version-4.0/customizing/payload-type-development/browser-scripting#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"overview\",\"item\":\"https://docs.mythic-c2.net/version-4.0/customizing/customizing-public-agent\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"1. Payload Type Development\",\"item\":\"https://docs.mythic-c2.net/version-4.0/customizing/payload-type-development\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"5. Browser Scripting\",\"item\":\"https://docs.mythic-c2.net/version-4.0/customizing/payload-type-development/browser-scripting\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.mythic-c2.net/version-4.0/customizing/payload-type-development/browser-scripting#article\",\"headline\":\"5. Browser Scripting\",\"name\":\"5. Browser Scripting\",\"description\":\"Render payload command responses with Mythic 4.0 browser scripts.\",\"url\":\"https://docs.mythic-c2.net/version-4.0/customizing/payload-type-development/browser-scripting\",\"mainEntityOfPage\":{\"@id\":\"https://docs.mythic-c2.net/version-4.0/customizing/payload-type-development/browser-scripting#webpage\"},\"dateModified\":\"2026-08-03T05:40:14.747Z\",\"publisher\":{\"@id\":\"https://docs.mythic-c2.net/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.mythic-c2.net#website\"}}]}\u003c/script>","siteName":"Mythic","nav":{"global":{"anchors":[{"anchor":"GitHub","icon":"github","href":"https://github.com/its-a-feature/Mythic"},{"anchor":"#mythic Community","icon":"slack","href":"https://slack.specterops.io"}]},"versions":[{"version":"version 4.0","tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/version-4.0/home"}]},{"tab":"GraphQL API","pages":[{"title":"GraphQL API","href":"/version-4.0/scripting/home"}]},{"tab":"Development","groups":[{"group":"overview","pages":[{"title":"Overview","href":"/version-4.0/customizing/customizing-public-agent"},{"group":"Hooking Features","pages":[{"title":"Overview","href":"/version-4.0/customizing/hooking-features"},{"title":"Actions","href":"/version-4.0/customizing/hooking-features/actions"},{"group":"Linking Agents","pages":[{"title":"Overview","href":"/version-4.0/customizing/hooking-features/linking-agents"},{"title":"P2P Connections","href":"/version-4.0/customizing/hooking-features/linking-agents/action-p2p_info"}]},{"title":"Process Browser","href":"/version-4.0/customizing/hooking-features/process_list"},{"title":"Artifacts","href":"/version-4.0/customizing/hooking-features/artifacts"},{"title":"Credentials","href":"/version-4.0/customizing/hooking-features/credentials"},{"title":"File Downloads (Agent -> Mythic)","href":"/version-4.0/customizing/hooking-features/download"},{"title":"File Uploads (Mythic -> Agent)","href":"/version-4.0/customizing/hooking-features/action-upload"},{"title":"Screenshots","href":"/version-4.0/customizing/hooking-features/screenshots"},{"title":"Add / Remove Commands","href":"/version-4.0/customizing/hooking-features/commands"},{"title":"Keylog","href":"/version-4.0/customizing/hooking-features/keylog"},{"title":"File Browser","href":"/version-4.0/customizing/hooking-features/file-browser"},{"title":"Tokens","href":"/version-4.0/customizing/hooking-features/tokens"},{"title":"Alerts","href":"/version-4.0/customizing/hooking-features/alerts"},{"title":"SOCKS","href":"/version-4.0/customizing/hooking-features/socks"},{"title":"RPFWD","href":"/version-4.0/customizing/hooking-features/rpfwd"},{"title":"Interactive Tasking","href":"/version-4.0/customizing/hooking-features/interactive-tasking"},{"title":"Task status","href":"/version-4.0/customizing/hooking-features/task-status"},{"title":"OnContainerStart","href":"/version-4.0/customizing/hooking-features/oncontainerstart"},{"title":"Task Context Tracking","href":"/version-4.0/customizing/hooking-features/context-tracking"}]},{"group":"1. Payload Type Development","pages":[{"title":"1. Overview","href":"/version-4.0/customizing/payload-type-development"},{"group":"2. Payload Type Definition","pages":[{"title":"Payload Type Definition","href":"/version-4.0/customizing/payload-type-development/payload-type-info/payload-type-definition"},{"title":"Dynamic Build Parameters \u0026 C2 Variations","href":"/version-4.0/customizing/payload-type-development/payload-type-info/dynamic-build-parameters"},{"title":"JSONString Parameters","href":"/version-4.0/customizing/payload-type-development/payload-type-info/json-string-parameters"},{"title":"Wrapper Compatibility","href":"/version-4.0/customizing/payload-type-development/payload-type-info/wrapper-compatibility"},{"title":"Container Syncing","href":"/version-4.0/customizing/payload-type-development/payload-type-info/container-syncing"},{"title":"Turning a VM into a Container","href":"/version-4.0/customizing/payload-type-development/payload-type-info/turning-a-vm-into-a-container"}]},{"group":"3. Adding Commands","pages":[{"title":"Overview","href":"/version-4.0/customizing/payload-type-development/adding-commands"},{"title":"Commands","href":"/version-4.0/customizing/payload-type-development/adding-commands/commands"}]},{"group":"4. Create Tasking \u0026 Comms Format","pages":[{"title":"Overview","href":"/version-4.0/customizing/payload-type-development/create_tasking"},{"group":"Agent Messages","pages":[{"title":"Overview","href":"/version-4.0/customizing/payload-type-development/create_tasking/agent-side-coding"},{"title":"1. Agent Message Format","href":"/version-4.0/customizing/payload-type-development/create_tasking/agent-side-coding/agent-message-format"},{"title":"2. Checkin","href":"/version-4.0/customizing/payload-type-development/create_tasking/agent-side-coding/initial-checkin"},{"title":"3. Get Tasking","href":"/version-4.0/customizing/payload-type-development/create_tasking/agent-side-coding/action_get_tasking"},{"title":"4. Submitting Responses","href":"/version-4.0/customizing/payload-type-development/create_tasking/agent-side-coding/action-post_response"},{"title":"5. SOCKS","href":"/version-4.0/customizing/payload-type-development/create_tasking/agent-side-coding/socks"},{"title":"6. Reverse Port Forward","href":"/version-4.0/customizing/payload-type-development/create_tasking/agent-side-coding/rpfwd"},{"title":"7. Peer-to-peer messages","href":"/version-4.0/customizing/payload-type-development/create_tasking/agent-side-coding/delegates"},{"title":"8. Interactive Tasking","href":"/version-4.0/customizing/payload-type-development/create_tasking/agent-side-coding/8.-interactive-tasking"},{"title":"9. Agent RPC","href":"/version-4.0/customizing/payload-type-development/create_tasking/agent-side-coding/agent-rpc"},{"title":"10. File Editor Protocol","description":"Implement Mythic's interactive, versioned remote text editor in an agent command","href":"/version-4.0/customizing/payload-type-development/create_tasking/agent-side-coding/file-editor-protocol"}]}]},{"title":"5. Browser Scripting","href":"/version-4.0/customizing/payload-type-development/browser-scripting"},{"title":"6. Dynamic Command Parameter Values","description":"Populate command choices from callback context and Mythic RPC","href":"/version-4.0/customizing/payload-type-development/dynamic-parameter-values"},{"title":"7. Sub-tasking / Task Callbacks","href":"/version-4.0/customizing/payload-type-development/sub-tasking-task-callbacks"},{"title":"8. OPSEC Checking","href":"/version-4.0/customizing/payload-type-development/opsec-checking"},{"title":"9. Translation Containers","href":"/version-4.0/customizing/payload-type-development/translation-containers"},{"title":"10. Process Response","href":"/version-4.0/customizing/payload-type-development/process-response"},{"title":"11 TypedArray Parse Function","href":"/version-4.0/customizing/payload-type-development/12-typedarray-parse-function"},{"title":"12. SOCKS","href":"/version-4.0/customizing/payload-type-development/socks"},{"title":"13. Reverse PortFwd","href":"/version-4.0/customizing/payload-type-development/reverse-portfwd"},{"title":"14. Interactive Tasking","href":"/version-4.0/customizing/payload-type-development/15.-interactive-tasking"}]},{"group":"2. C2 Development","pages":[{"group":"2.1 Getting Started","pages":[{"title":"1. Getting Started","href":"/version-4.0/customizing/c2-related-development/mythic-definition/2.1.1-c2-class-definition"},{"title":"2. Parameters","href":"/version-4.0/customizing/c2-related-development/mythic-definition/2.1.2-c2-parameters"},{"title":"3. Running","href":"/version-4.0/customizing/c2-related-development/mythic-definition/2.1.3-c2-running"},{"title":"4. Server Code","href":"/version-4.0/customizing/c2-related-development/mythic-definition/2.1.4-c2-server-code"}]},{"group":"2.2 Advanced Features","pages":[{"title":"1. Configuration Files","href":"/version-4.0/customizing/c2-related-development/server-side-coding/2.2.1-c2-configuration-files"},{"title":"2. OPSEC Checks","href":"/version-4.0/customizing/c2-related-development/server-side-coding/2.2.2-opsec-checks-for-c2-profiles"},{"title":"3. Configuration Checks","href":"/version-4.0/customizing/c2-related-development/server-side-coding/2.2.3-configuration-checks"},{"title":"4. Sample Message","href":"/version-4.0/customizing/c2-related-development/server-side-coding/2.2.4-sample-message"},{"title":"5. File Hosting","href":"/version-4.0/customizing/c2-related-development/server-side-coding/2.2.5-file-hosting"},{"title":"6. Redirect Rules","href":"/version-4.0/customizing/c2-related-development/server-side-coding/2.2.6-redirect-rules"},{"title":"7. Get IOC","href":"/version-4.0/customizing/c2-related-development/server-side-coding/2.2.7-get-ioc"},{"title":"8. Push C2","href":"/version-4.0/customizing/c2-related-development/server-side-coding/2.2.8-push-c2"},{"title":"9. Custom RPC","href":"/version-4.0/customizing/c2-related-development/server-side-coding/2.2.9-custom-rpc"}]},{"group":"2.3 Docker","pages":[{"title":"1. Docker Containers","href":"/version-4.0/customizing/c2-related-development/server-side-coding/2.3.1-c2-docker-containers"}]}]},{"group":"3. Consuming Containers","pages":[{"title":"Overview","href":"/version-4.0/customizing/3.-consuming-containers"},{"title":"Webhooks","href":"/version-4.0/customizing/3.-consuming-containers/webhooks"},{"title":"Logging","href":"/version-4.0/customizing/3.-consuming-containers/logging"},{"group":"Eventing","pages":[{"title":"Overview","href":"/version-4.0/customizing/3.-consuming-containers/eventing"},{"title":"Operator Context (run_as)","href":"/version-4.0/customizing/3.-consuming-containers/eventing/operator-context-run_as"},{"title":"Workflow Triggers","href":"/version-4.0/customizing/3.-consuming-containers/eventing/workflow-triggers"},{"title":"Steps","href":"/version-4.0/customizing/3.-consuming-containers/eventing/steps"}]},{"title":"Auth","href":"/version-4.0/customizing/3.-consuming-containers/auth"},{"title":"Chat Containers","href":"/version-4.0/customizing/3.-consuming-containers/chat"}]},{"title":"4. Extending Agent Commands","href":"/version-4.0/customizing/4.-extending-agent-commands"},{"title":"5. Custom Browsers","href":"/version-4.0/customizing/5.-custom-browsers"},{"title":"Mythic UI Development","href":"/version-4.0/customizing/mythic-ui-development"}]}]},{"tab":"MythicRPC","pages":[{"title":"MythicRPC","href":"/version-4.0/mythicrpc/mythicrpc"}]}]},{"version":"version 3.3","pages":[{"title":"version 3.3","href":"/customizing/payload-type-development/browser-scripting"}]},{"version":"version 3.0","tabs":[{"tab":"Documentation"}]},{"version":"version 2.3","tabs":[{"tab":"Documentation"}]}]},"basePath":"","title":"5. Browser Scripting - Mythic","buildId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","deploymentId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","dynamics":[],"chunks":[]}