deliter 203 Posted July 20, 2016 Report Share Posted July 20, 2016 Updated this code to now have a evalUI function,so add this to your HTML anywhere inside the body tag and should work fine Useful for debugging define $evalUI(#input) { set(#varThree,#input,"Global") wait(0.3) return($plugin function("SocketCommands.dll", "$url decode", #UIOutput)) } set(#sa,$evalUI("new Date().getTime()"),"Global") ui html panel("<input type=\"hidden\" id=\"invElem\" variable=\"#varThree\" onChange=\'evalUI()\' /> <script> function evalUI()\{ ubot.runScript(\'set(#UIOutput,\"\'+encodeURIComponent(eval(document.querySelector(\"#invElem\").value).toString())+\'\",\"Global\")\') \} </script>",200) Quote Link to post Share on other sites
Pizza Pro 11 Posted July 28, 2016 Report Share Posted July 28, 2016 I've been experimenting with the code, and this seems to work for me: <input id="inputEval" onmouseover="this.value = document.body.innerHTML"></input> Basically, it will show you the UI Element's innerHTML the moment you mouseover it. I tried using "onload" instead of "onmouseover", but I have no idea why it doesn't work. Quote Link to post Share on other sites
kate 5 Posted August 11, 2016 Report Share Posted August 11, 2016 great, thank you for share this Quote Link to post Share on other sites
deliter 203 Posted May 2, 2017 Author Report Share Posted May 2, 2017 updated this code so that you have a function to eval the UI, you can also change HTML in the UI calling this like document.querySelector("#yourDiv").innerHTML="<b style='color:red;'>hello</b>" from ubot, if you click run on the #sa node,hello will pop up in the html panel define $evalUI(#input) { set(#varThree,#input,"Global") wait(0.3) return($plugin function("SocketCommands.dll", "$url decode", #UIOutput)) } ui html panel("<input type=\"hidden\" id=\"invElem\" variable=\"#varThree\" onChange=\'evalUI()\' /> <div id=\"yourDiv\"></div> <script> function evalUI()\{ ubot.runScript(\'set(#UIOutput,\"\'+encodeURIComponent(eval(document.querySelector(\"#invElem\").value).toString())+\'\",\"Global\")\') \} </script>",200) set(#sa,$evalUI("document.querySelector(\"#yourDiv\").innerHTML=\"<b style=\'color:red;\'>hello</b>\""),"Global") Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.