shell bypass 403
if(!window.parent.Joomla||typeof window.parent.Joomla.getOptions!="function")throw new Error("Joomla API not found");const rootPath=window.parent.Joomla.getOptions("system.paths").rootFull,cmPath=`${rootPath}/media/vendor/codemirror`;let CMsettings={indentOnInit:!0,config:{mode:"htmlmixed",theme:"default",lineNumbers:!0,lineWrapping:!0,indentUnit:2,tabSize:2,indentWithTabs:!0,matchBrackets:!0,saveCursorPosition:!0,styleActiveLine:!0},jsFiles:[`${cmPath}/lib/codemirror.min.js`,`${cmPath}/addon/edit/matchbrackets.min.js`,`${cmPath}/mode/xml/xml.min.js`,`${cmPath}/mode/javascript/javascript.min.js`,`${cmPath}/mode/css/css.min.js`,`${cmPath}/mode/htmlmixed/htmlmixed.min.js`,`${cmPath}/addon/dialog/dialog.min.js`,`${cmPath}/addon/search/searchcursor.min.js`,`${cmPath}/addon/search/search.min.js`,`${cmPath}/addon/selection/active-line.min.js`],cssFiles:[`${cmPath}/lib/codemirror.css`,`${cmPath}/addon/dialog/dialog.css`]},tinymce,editor,codemirror;const chr=0,isMac=/macintosh|mac os/i.test(navigator.userAgent),loadScript=e=>new Promise((t,n)=>{const o=document.createElement("script");o.src=e,o.onload=()=>t(),o.onerror=()=>n(new Error(`Failed to load the script ${e}`)),document.head.appendChild(o)}),findDepth=(e,t)=>{const n=e.indexOf(t);let o=0;for(let i=n-1;i>=0;i-=1)switch(e.charAt(i)){case"<":o-=1;break;case">":o+=1;break;case"&":o+=1;break}return o};window.tinymceHighlighterSubmit=()=>{const e="�",{isDirty:t}=codemirror,{doc:n}=codemirror;n.somethingSelected()&&n.setCursor(n.getCursor()),n.replaceSelection(e);const o=codemirror.getCursor();let i=n.getLine(o.line);findDepth(i,e)!==0&&(i=i.replace(e,""),n.replaceRange(i,window.CodeMirror.Pos(o.line,0),window.CodeMirror.Pos(o.line)));const r=codemirror.getValue(),s=new RegExp(`<script(.*?)>(.*?)${e}(.*?)<\/script>`,"ms"),d=new RegExp(`<style(.*?)>(.*?)${e}(.*?)</style>`,"ms"),c=new RegExp(`<[^>]*(${e}).*>|^(${e})|(${e})$`);r.search(s)!==-1||r.search(d)!==-1||r.search(c)!==-1?editor.setContent(r.replace(e,"")):editor.setContent(r.replace(e,'<span id="CmCaReT"></span>')),editor.isNotDirty=!t,t&&editor.nodeChanged();const a=editor.dom.select("span#CmCaReT")[0];a&&(editor.selection.scrollIntoView(a),editor.selection.setCursorLocation(a,0),editor.dom.remove(a))},document.addEventListener("keydown",e=>{const t=e||window.event;let n=!1;"key"in t?n=t.key==="Escape"||t.key==="Esc":n=t.keyCode===27,n&&tinymce.activeEditor.windowManager.close()});const start=()=>{if(typeof window.CodeMirror!="function")throw new Error(`CodeMirror not found in "${CMsettings.path}", aborting...`);const e=window.parent.document.querySelectorAll(".tox-dialog__footer")[0],t=window.parent.document.createElement("div"),n='<td style="font-size:11px;background:#777;color:#fff;padding:0 4px">',o='<td style="font-size:11px;padding-right:5px">';t.innerHTML=` <table cellspacing="0" cellpadding="0" style="border-spacing:4px"> <tr> ${n}${isMac?"⌘-F":"Ctrl-F</td>"}${o}${tinymce.translate("Start search")}</td> ${n}${isMac?"⌘-G":"Ctrl-G"}</td> ${o}${tinymce.translate("Find next")}</td> ${n}${isMac?"⌘-Alt-F":"Shift-Ctrl-F"}</td> ${o}${tinymce.translate("Find previous")}</td> </tr> <tr> ${n}${isMac?"⌘-Alt-F":"Shift-Ctrl-F"}</td> ${o}${tinymce.translate("Replace")}</td> ${n}${isMac?"Shift-⌘-Alt-F":"Shift-Ctrl-R"}</td> ${o}${tinymce.translate("Replace all")}</td> </tr> </table>`,e.insertAdjacentElement("afterbegin",t);let i=editor.getContent({source_view:!0});i=i.replace(/<span\s+style="display: none;"\s+class="CmCaReT"([^>]*)>([^<]*)<\/span>/gm,String.fromCharCode(chr)),editor.dom.remove(editor.dom.select(".CmCaReT")),tinymce.each(editor.contextToolbars,r=>{r.panel&&r.panel.hide()}),window.CodeMirror.defineInitHook(r=>{r.focus();const s=r.getSearchCursor(String.fromCharCode(chr),!1);if(s.findNext()&&(r.setCursor(s.to()),s.replace("")),editor.settings.codemirror.indentOnInit){const d=r.lineCount();r.operation(()=>{for(let c=0;c<d;++c)r.indentLine(c)})}}),CMsettings.config.value=i,codemirror=window.CodeMirror(document.body,CMsettings.config),codemirror.isDirty=!1,codemirror.on("change",r=>{r.isDirty=!0}),codemirror.setSize("100%","100%"),codemirror.refresh()};if(tinymce=window.parent.tinymce,!tinymce)throw new Error("tinyMCE not found");editor=tinymce.activeEditor;const userSettings=editor.settings.codemirror;userSettings.fullscreen&&(CMsettings.jsFiles.push(`${cmPath}/addon/display/fullscreen.min.js`),CMsettings.cssFiles.push(`${cmPath}/addon/display/fullscreen.css`)),CMsettings={...CMsettings,...userSettings},CMsettings.cssFiles.forEach(e=>{const t=document.createElement("link");t.rel="stylesheet",t.href=e,document.head.appendChild(t)}),CMsettings.jsFiles.reduce((e,t)=>e.then(()=>loadScript(t)),Promise.resolve(!0)).then(()=>{CMsettings.config.theme&&(document.documentElement.className+=CMsettings.config.theme.replace(/(^|\s)\s*/g," cm-s-")),start()});