Jump to content
UBot Underground

deliter

Fellow UBotter
  • Content Count

    603
  • Joined

  • Last visited

  • Days Won

    52

Posts posted by deliter

  1. heres how to do that, I added bootstrap to the page, to make the elements nice looking, basically you need to add a variable="#myVariable" attribute to the textbox to set the variable

     

    and for the button a onClick="ubot.runScript('myScriptHere')" to the button which fires the ubot script

     

    edit you meant the UI designer not panel, well this is still pretty much how that works

    ui html panel("<head>
    <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.3.7/cyborg/bootstrap.min.css\"  crossorigin=\"anonymous\">
    
    <style>
    div\{
    text-align:center
    \}
    </style>
    </head>
    
    <body>
    
    <div>
     <label for=\"inputdefault\">Type Something</label>
          <input variable=\"#myInput\" class=\"form-control\" id=\"inputdefault\" type=\"text\">
    <button type=\"button\" onClick=\"ubot.runScript(\'clickMe\')\" class=\"btn btn-danger\">Click Me</button></div>
    
    
    
    <script src=\"https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js\"></script>
    <script src=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js\" integrity=\"sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa\" crossorigin=\"anonymous\"></script>
    </body>",300)
    define clickMe {
        alert(#myInput)
    }
    
    
    • Like 1
  2. to reload a page use navigate and the $url, should work

     

    for the textbox it is a change attribute command, like below, go into settings and change to chrome 21, chrome 49 is awful at rendering from the load html command

    load html("<head>
    <style>
    div,p\{
    text-align:center;
    color:red;
    font-weight: bold;
      font-size: 40px;
    \}
    </style>
    </head>
    
    
    
    <div><input type=\"text\" id=\"inputbox\" value=\"Delete Me\"/></div>
    
    <p id=\"counter\">Starting Counter</p>")
    wait for browser event("Everything Loaded","")
    set(#position,3,"Global")
    loop(3) {
        change attribute(<id="counter">,"innertext",#position)
        decrement(#position)
        wait(1)
    }
    change attribute(<id="inputbox">,"value","")
    change attribute(<id="counter">,"innertext","Deleted")
    
    
    • Like 1
  3. its got to do with a combination of JS escaping quotation marks and HTML escaping quotation marks, HInsomnia wrote a post recently enough which shows how to escape in HTML, and if you check my post in the free scripts section for asynchronous HTTP Gets it shows the JS way of escaping quotes 

     

    The reason the .length works is because JS doesnt need to pass quotations since .length is a type of integer, when you wanted "abc" you need to escape things so that the string has the quotes around them

  4. quick done ha

    define processForm {
        set(#first name, $scrape attribute(<first name field>, "value"), "Global")
        set(#second name, $scrape attribute(<last name field>, "value"), "Global")
        set(#gender, $scrape attribute(<checked="true">, "value"), "Global")
        set(#car, $scrape attribute($element offset(<tagname="select">, 0), "value"), "Global")
        change attribute(<first name field>, "value", "")
        change attribute(<last name field>, "value", "")
        alert("thank you {#first name}")
    }
    load html("<!DOCTYPE html>
    <html>
    <body>
    
    <form>
      First name:<br>
      <input type=\"text\" name=\"firstname\">
      <br>
      Last name:<br>
      <input type=\"text\" name=\"lastname\">
      <br>
      
       <input type=\"radio\" name=\"gender\" value=\"male\" checked> Male<br>
      <input type=\"radio\" name=\"gender\" value=\"female\"> Female<br>
    <select>
      <option value=\"volvo\">Volvo</option>
      <option value=\"saab\">Saab</option>
      <option value=\"mercedes\">Mercedes</option>
      <option value=\"audi\">Audi</option>
    </select></form>
      <button onClick=\"ubot.runScript(\'processForm()\')\">Submit</button>
    
    
    </body>
    </html>
    ")
    
    
    • Like 1
  5. you were probably trying to use the submit button in the forum, which would post the information,and clear it before Ubot could scrape it, you could then scrape the URL at the top of the page and scrape out the data, easier to just put a button outside of the form, and use ubot.runScript on the form

     

    or if you wanted ubot to get the data live you could use onChange on most of the form elements, and have a command that scrapes the new values in ubot, instead of it being triggered by the button click in this code

    define processForm {
        set(#first name, $scrape attribute(<first name field>, "value"), "Global")
        set(#second name, $scrape attribute(<last name field>, "value"), "Global")
        
        change attribute(<first name field>, "value", "")
        change attribute(<last name field>, "value", "")
        alert("thank you {#first name}")
    }
    load html("<!DOCTYPE html>
    <html>
    <body>
    
    <form>
      First name:<br>
      <input type=\"text\" name=\"firstname\">
      <br>
      Last name:<br>
      <input type=\"text\" name=\"lastname\">
      <br>
    </form> 
      <button onClick=\"ubot.runScript(\'processForm()\')\">Submit</button>
    
    
    </body>
    </html>
    ")
    
    
    • Like 1
  6. your code is probably wrong,  please post your code so someone can take a look, if I had to guess you probably have set your list to delete duplicates, but thats only guessing without looking at your code, although ubots child and sibling selectors are a disgrace, better off using the the add on I made probably 1 line of code for this table, but heres every parameter on that table working fine

    navigate("https://www.expireddomains.net/backorder-expired-domains/", "Wait")
    wait for browser event("Everything Loaded", "")
    add list to list(%name, $scrape attribute(<class="field_domain">, "textcontent"), "Don\'t Delete", "Global")
    add list to list(%BL, $scrape attribute(<class="field_bl">, "textcontent"), "Don\'t Delete", "Global")
    add list to list(%field_domainpop, $scrape attribute(<class="field_domainpop">, "textcontent"), "Don\'t Delete", "Global")
    add list to list(%field_abirth, $scrape attribute(<class="field_abirth">, "textcontent"), "Don\'t Delete", "Global")
    add list to list(%field_aentries, $scrape attribute(<class="field_aentries">, "textcontent"), "Don\'t Delete", "Global")
    add list to list(%field_similarweb, $scrape attribute(<class="field_similarweb">, "textcontent"), "Don\'t Delete", "Global")
    add list to list(%field_similarweb_countrycode, $scrape attribute(<class="field_similarweb_countrycode">, "textcontent"), "Don\'t Delete", "Global")
    add list to list(%field_dmoz, $scrape attribute(<class="field_dmoz">, "textcontent"), "Don\'t Delete", "Global")
    add list to list(%field_statuscom, $scrape attribute(<class="field_statuscom">, "textcontent"), "Don\'t Delete", "Global")
    add list to list(%field_statusnet, $scrape attribute(<class="field_statusnet">, "textcontent"), "Don\'t Delete", "Global")
    add list to list(%field_statusorg, $scrape attribute(<class="field_statusorg">, "textcontent"), "Don\'t Delete", "Global")
    add list to list(%field_statusde, $scrape attribute(<class="field_statusde">, "textcontent"), "Don\'t Delete", "Global")
    add list to list(%field_statustld_registered, $scrape attribute(<class="field_statustld_registered">, "textcontent"), "Don\'t Delete", "Global")
    add list to list(%field_enddate, $scrape attribute(<class="field_enddate">, "textcontent"), "Don\'t Delete", "Global")
    
    
    • Like 1
  7. most likely the browser has crashed, try add $document text to a variable, or the $url function to see if ubot is still able to interact with the webpage, if that works, make sure the page has fully loaded before it executes the scrape attribute

  8. function hideshow(which){
    if (!document.getElementById)
    return
    if (which.style.display=="block"){
    which.style.display="none"
    document.body.scrollTop=0
    
    }
    else
    which.style.display="block"
    }
    

    Havnt tested it, but the "document.body.scrollTop=0" line will take you to the top of the page, just make sure the line is in the part of the script thats its needed in, I think there, from looking, element goes invisible, then bring the scroll to the top of the page

    • Like 1
  9. It is not actually a bug on Ubots end, I dont know enough about JS to understand it but the page is not allowing any eval from an outside source, all types of functions will not work on this page, such as $document text, 

     

    this is a bug or a feature of CEF,  this is the error CEF gets when Ubot tries to eval into Chrome

    "Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self'"."

     

     

     

    There is a solution, using Ubot Chrome 21 works fine on this page, but as I said, it is a security policy by CEF, not a ubot error, hope I dont see this error often!! Ive never seen it before,basically from what I can understand, sites now on recent Chrome versions have the option to not allow eval on their webpages

     

    https://developer.chrome.com/extensions/contentSecurityPolicy

    • Like 1
  10. I would like if they just dropped the whole CEF charade, in 4 months time Stealth was soon to be launched 2 years ago, it doesn't work and it never has, my update money should be spent on creating an actual usable code view, or actually hiring a developer who can complete this project, there are plenty of companies that you can purchase DLL's from that have Chrome or alternatives, which can make it easier to code, rather than free CEF Sharp to run Ubot from

     

    https://www.essentialobjects.com/Products/WebBrowser/Default.aspx

    • Like 4
  11. Hey

     

    by exbrowser I mean assuming the plugins are now available for it, works with HTTP Post etc

     

    this plugin was written by this man

     

    https://www.redfin.com/blog/2014/06/an-extension-to-find-css-selectors.html

     

    Doesnt seem to be any copyright or anything but he made a great plugin and I have just added some things to generate scrape code for the CSS Plugin

     

    In this video I quickly generate code to scrape all the thread links on the page, you notice this plugin breaks up the css path, and by starting from the end and clicking backwords, until it gives me the desired amount of matches, I also show you that you can skip some, not a direct path going backwards, as some paths are direct to to the element you originally selected, then just fill in variable/list name and copies the code to the clipboard, and paste it into ubot

     

    heres a demo video

     

    http://screencast-o-matic.com/watch/cbebV06gdY

     

    heres the plugin, unzip it and follow these instructions to install in Chrome

     

    https://1drv.ms/u/s!AgO9AudYbciJhLNE2Tx4H1yxT9vwmg

     

    to install in Chrome

     

    1. Visit chrome://extensions (via omnibox or menu -> Tools -> Extensions).
    2. Enable Developer mode by ticking the checkbox in the upper-right corner.
    3. Click on the "Load unpacked extension..." button.
    4. Select the directory containing your unpacked extension.

     

    Please leave feedback as if people use it I might actually update it !!

    • Like 4
  12. Here is a version for the Ubot 4

    add list to list(%href,$list from text("https://www.youtube.com/results?q=soccer&sp=SBTqAwA%253D
    https://www.youtube.com/results?q=soccer&sp=SCjqAwA%253D
    https://www.youtube.com/results?q=soccer&sp=SDzqAwA%253D
    https://www.youtube.com/results?q=soccer&sp=SFDqAwA%253D
    https://www.youtube.com/results?q=soccer&sp=SGTqAwA%253D
    https://www.youtube.com/results?q=soccer&sp=SHjqAwA%253D",$new line),"Delete","Global")
    set(#position,0,"Global")
    loop($list total(%href)) {
        set(#get,$plugin function("HTTP post.dll", "$http get", $list item(%href,#position), "", "", "", ""),"Global")
        scrapePage(#get)
        increment(#position)
    }
    define scrapePage(#doc) {
        set(#doc,$plugin function("DeliterCSS.dll", "$Deliter URL Encode", #doc),"Local")
        run javascript("/*
     * DOMParser HTML extension
     * 2012-09-04
     * 
     * By Eli Grey, http://eligrey.com
     * Public domain.
     * NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
     */
    
    /*! @source https://gist.github.com/1129031 */
    /*global document, DOMParser*/
    
    (function(DOMParser) \{
    	\"use strict\";
    
    	var
    	  DOMParser_proto = DOMParser.prototype
    	, real_parseFromString = DOMParser_proto.parseFromString
    	;
    
    	// Firefox/Opera/IE throw errors on unsupported types
    	try \{
    		// WebKit returns null on unsupported types
    		if ((new DOMParser).parseFromString(\"\", \"text/html\")) \{
    			// text/html parsing is natively supported
    			return;
    		\}
    	\} catch (ex) \{\}
    
    	DOMParser_proto.parseFromString = function(markup, type) \{
    		if (/^\\s*text\\/html\\s*(?:;|$)/i.test(type)) \{
    			var
    			  doc = document.implementation.createHTMLDocument(\"\")
    			;
    	      		if (markup.toLowerCase().indexOf(\'<!doctype\') > -1) \{
            			doc.documentElement.innerHTML = markup;
          			\}
          			else \{
            			doc.body.innerHTML = markup;
          			\}
    			return doc;
    		\} else \{
    			return real_parseFromString.apply(this, arguments);
    		\}
    	\};
    \}(DOMParser));
    
    
    
    
    try\{
    
    document.body.removeChild(ubotEl)
    
    \}
    
    catch(err)\{console.log(err)\}
    var mydoc = decodeURIComponent(\"{#doc}\")
    
    var parser = new DOMParser();
    var mydoc = parser.parseFromString(mydoc, \"text/html\");
    
    mydoc.body.style.display=\"none\"
    var thedoc = mydoc.querySelectorAll(\"*\")
    for(var x =0;x < thedoc.length;x++)\{
    
    thedoc[x].dataset.ubot = \"true\"
    \}
    thedoc=\"\"
    var ubotEl = document.createElement(\"html\")
    ubotEl.innerHTML=mydoc.body.outerHTML
    
    
    document.body.appendChild(ubotEl)")
        comment("add your ubot scrape codes and logic below, for handling the page")
         add list to list(%titles,$scrape attribute(<((tagname="a" AND class="yt-uix-tile-link yt-ui-ellipsis yt-ui-ellipsis-2 yt-uix-sessionlink      spf-link ") AND data-ubot="true")>,"innertext"),"Delete","Global")
    }
    
    
    • Like 2
×
×
  • Create New...