Jump to content
UBot Underground

Eval Ui Html Panel Method


Recommended Posts

 



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)


Link to post
Share on other sites
  • 2 weeks later...

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. :o

Link to post
Share on other sites
  • 2 weeks later...
  • 8 months later...

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")

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...