mrwalt 34 Posted May 13, 2015 Report Share Posted May 13, 2015 Does anyone have an example code of how to solve captcha using the CBrowser plugin? This could be with using UBot Commands/Parameters or using XPath. It appears to be totally different from the way that you solve captcha within the Ubot browser and I'm curious if anyone else has run across any difficulty with this besides myself? The reason I ask here is because no one has responded within the actual thread for the plugin itself just in case you may be asking that question as to why not ask there first. mrwalt Quote Link to post Share on other sites
Bot-Factory 602 Posted May 13, 2015 Report Share Posted May 13, 2015 Does anyone have an example code of how to solve captcha using the CBrowser plugin? This could be with using UBot Commands/Parameters or using XPath. It appears to be totally different from the way that you solve captcha within the Ubot browserand I'm curious if anyone else has run across any difficulty with this besides myself? The reason I ask here is because no one has responded within the actual thread for the pluginitself just in case you may be asking that question as to why not ask there first. mrwalt Where do you struggle exactly?You can not use the Ubot internal captcha commands of course because they only work with the build in browser. So you have to use one of the captcha plugins. And then it's basically like:Load the page in google chromeWait for the picture elementDownload the pictureGet the captcha image resolved via the captcha pluginEnter the text into captcha field.Submit it. It's similar to how you do it with http plugin. I did not try it yet, but the main thing really is, that you have to use one of the captcha plugins because the build in commands are not working. Or where do you struggle exactly at the moment? Dan Quote Link to post Share on other sites
mrwalt 34 Posted May 13, 2015 Author Report Share Posted May 13, 2015 Hi Dan, Thank you for your response. Just like you mentioned I used the advanced captcha pluginand where I'm having a difficult time are as follows "Element to capture" field for the"CBrowser Save Screenshot Element" command and the "element to type into" field forthe "CBrowser Type Text" command. The "CBrowser Save Screenshot Element" command is where I was using the advancedcaptcha plugin but issue is the "element to type into" field. If you try it with the XPath Builder Pro it will provide you the string of code but when you tryand run it, it will produce an error message within Ubot (not the fault of XPath Builder Pro). If you go through this scenario just using the UBot Playground captcha form using the CBrowser commands and not UBot commands you will see what I mean when youtry to solve a captcha. mrwalt Quote Link to post Share on other sites
Bot-Factory 602 Posted May 13, 2015 Report Share Posted May 13, 2015 Ok, here you go: clear all dataplugin command("Communication.dll", "CBrowser Container", "Chrome", "", "") { plugin command("Communication.dll", "CBrowser Navigate", "http://ubotstudio.com/playground/captcha-form") plugin command("Communication.dll", "CBrowser Wait For Element", , 30) plugin command("Communication.dll", "CBrowser Save Screenshot Element", , "d:\\x.png") add list to list(%tmp,$list from text($plugin function("Advanced Captcha.dll", "$de-captcher.com", "xxx", "xxx", "d:\\x.png", "", "Recognize"),"|"),"Delete","Global") plugin command("Communication.dll", "CBrowser Type Text", "<name=\"ctl00$ContentPlaceHolder1$captcha\">", $list item(%tmp,$subtract($list total(%tmp),1))) alert($list item(%tmp,$subtract($list total(%tmp),1)))} CheersDan Quote Link to post Share on other sites
mrwalt 34 Posted May 14, 2015 Author Report Share Posted May 14, 2015 Hi Dan, Thank you for taking the time to put this togetheras I don't know what I was missing but I will run itand learn from it. Thank you again for your help. mrwalt 1 Quote Link to post Share on other sites
mrwalt 34 Posted May 14, 2015 Author Report Share Posted May 14, 2015 Hi Dan, Just as a quick follow up when I ran this command below there appearedto be an issue within Ubot. Did you get any error message within Ubotwhen you ran this command here -plugin command("Communication.dll", "CBrowser Save Screenshot Element", , "d:\\x.png") mrwalt Quote Link to post Share on other sites
Bot-Factory 602 Posted May 14, 2015 Report Share Posted May 14, 2015 Hi Dan, Just as a quick follow up when I ran this command below there appearedto be an issue within Ubot. Did you get any error message within Ubotwhen you ran this command here -plugin command("Communication.dll", "CBrowser Save Screenshot Element", , "d:\\x.png") mrwaltYou have to add the elememt or xpath code into that command. It as removed somehow when I copied the code into the forum.Didn't notice that when I wrote the post yesterday. Unfortunately I deleted that ubot file already :-( Dan Quote Link to post Share on other sites
Bot-Factory 602 Posted May 20, 2015 Report Share Posted May 20, 2015 Here's the missing Xpath expression: Ok, can't post the code here for some reason... Here's it: http://www.codeshare.io/cIhbG 1 Quote Link to post Share on other sites
mrwalt 34 Posted May 20, 2015 Author Report Share Posted May 20, 2015 Hi Dan, Words cannot describe how much I appreciate youproviding this code as it is literally a lifesaver for me. Thank you so much, mrwalt 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.