jackfitz 2 Posted May 2, 2010 Report Share Posted May 2, 2010 I am working on a bot which is creating forum accounts.Included in account creation is breaking a captcha. If the captcha is entered incorrectly, the page is reloaded and I am shown a message "The confirmation code was entered incorrectly"http://www.freeimagehosting.net/uploads/404fd7063d.png I am struggling to find a way for ubot to recognise that the captcha needs re-entering.I could us an if statement, if, error code (The confirmation code was entered incorrectly) then (decaptcha). The problem with this is I am working with forums in multiple languages. There is no inner our outer html code to recognise the error message. Here is the error in a different language, and the options to choose via attribute. I tried wildcard *class=gen* with no luckhttp://www.freeimagehosting.net/uploads/9de419deea.png Quote Link to post Share on other sites
Eric 15 Posted May 2, 2010 Report Share Posted May 2, 2010 I am working on a bot which is creating forum accounts.Included in account creation is breaking a captcha. If the captcha is entered incorrectly, the page is reloaded and I am shown a message "The confirmation code was entered incorrectly"http://www.freeimagehosting.net/uploads/404fd7063d.png I am struggling to find a way for ubot to recognise that the captcha needs re-entering.I could us an if statement, if, error code (The confirmation code was entered incorrectly) then (decaptcha). The problem with this is I am working with forums in multiple languages. There is no inner our outer html code to recognise the error message. Here is the error in a different language, and the options to choose via attribute. I tried wildcard *class=gen* with no luckhttp://www.freeimagehosting.net/uploads/9de419deea.png I think you have to try to find a standard attribute that shows up when the error existed. If different language error text shows up for different sites, then I guess you have to set up all the different "if-then" scenerio for the loopback to re-enter the captcha. Unless, there is a standard span or div attribute, or any attribute that is the same throughout all the different error text, which is not the case usually.I also faced these kind of issues for other platform, I just have to add in all the different error text in my bot for evaluating a action, because there isn't any standard attribute for me to pick on, only text Quote Link to post Share on other sites
jackfitz 2 Posted May 2, 2010 Author Report Share Posted May 2, 2010 Hey Eric. I was hoping I wasnt going to hear that lol.But it's workable so cant complain. Another problem I am facing is after the bot recognises that the captcha is wrong, IE needs to refresh.At current I am using run Javascript to refresh the browser. After the Javascript I have a wait for the page to finish loading to be able to re enter user, pass, email and captcha. After the Javascript command refreshes the page it wont wait for page to load or delay before it clicks submit.This means that the second attempt at the captcha is unsucessfull. http://www.freeimagehosting.net/uploads/7b681f587d.png Is there another way to refresh the browser? Quote Link to post Share on other sites
alcr 135 Posted May 2, 2010 Report Share Posted May 2, 2010 Is there another way to refresh the browser?Not as far as I know - but you could use wait for instead of wait finish Quote Link to post Share on other sites
jackfitz 2 Posted May 3, 2010 Author Report Share Posted May 3, 2010 I tried wait for, didn't seem to do the trick.The page needs refreshing for the new captcha to load. Quote Link to post Share on other sites
trg7ija 3 Posted May 3, 2010 Report Share Posted May 3, 2010 I tried wait for, didn't seem to do the trick.The page needs refreshing for the new captcha to load. what i can say is, you use if statement The flow isif wait for = "The confirmation code was entered incorrectly" is trueThen run again your script navigate= Registration URL ( this will refresh the page )Fill in the form again Quote Link to post Share on other sites
jackfitz 2 Posted May 4, 2010 Author Report Share Posted May 4, 2010 what i can say is, you use if statement The flow isif wait for = "The confirmation code was entered incorrectly" is trueThen run again your script navigate= Registration URL ( this will refresh the page )Fill in the form again Good thinking. I have added this however I can’t get my head around one little bit.How to loop the whole script until true or set a limit to attempts e.g. 5. So I have my script here id the flow.-Gets the captcha error.-Reload lit item (which is registration page.-Run Script (the one its on) With this flow, if the captcha attempt is incorrect the second time it finished.How do I go about continually looping the attempts instead of copy and pasting the code within the current statement. bot attachedMain Bot.uboturl list.txt Quote Link to post Share on other sites
alcr 135 Posted May 5, 2010 Report Share Posted May 5, 2010 set #counter 0run sub register sub registerif evaluate #counter = 5 (or whatever number you want)then returnand here goes all your registering codeif search page incorrect confirmation codetheninc #counterrun sub register Quote Link to post Share on other sites
jackfitz 2 Posted May 6, 2010 Author Report Share Posted May 6, 2010 Hi alcr thanks for the input. I have tried to build what you suggested but cant get it to work.Would you mind taking a look at my bot please. Main Bot.uboturl list.txt Quote Link to post Share on other sites
alcr 135 Posted May 6, 2010 Report Share Posted May 6, 2010 Ahh, you forgot to put in if evaluate #counter = 5 (or whatever number you want)then return Quote Link to post Share on other sites
trg7ija 3 Posted May 9, 2010 Report Share Posted May 9, 2010 I think you use the while function But firstly you have your code for registration, Then, if the captcha is incorrectly input use while lopp with wait for command.. The pseudo code is like this 1) your command2) While Wait for "something" , run command again.. This While will looping until you entered the captcha correctly. BTW, I look at your bot and it is very badly coded... This is the new code for the User Details section..It will loop until the captcha is entered correctly.. PS: I just code to show you how to loop until the captcha entered correctly.. It will give you the rough idea what you want to do next.Main Bot.ubot Quote Link to post Share on other sites
jackfitz 2 Posted May 20, 2010 Author Report Share Posted May 20, 2010 trgij1 and alcr thanks for your help.I have been trying to make this for weks now and honestly I cant see my self ever finishing it. Please take a look herehttp://ubotstudio.com/forum/index.php?/topic/3766-ubot-coder-wanted-for-forum-bot/ Quote Link to post Share on other sites
JohnB 255 Posted May 24, 2010 Report Share Posted May 24, 2010 ok, I have found a way of dealing with error messages that so far has worked 100% of the time for me. Instead of choosing by attribute use the following: if=>search page , "error message" then=> run sub xyz The trick is to put the fill form nodes in a sub and the decaptcha nodes in another sub. The if/then goes at the end of the decaptcha sub. As such, if it finds the text, it is instructed to go back to the fill form sub or else continue on to the next sub/script. You can place the ENTIRE script inside a loop for, say, 3 cycles after which it will execute the node outside of the loop. I hope that makes sense, and more importantly, works for you. John Quote Link to post Share on other sites
jackfitz 2 Posted June 4, 2010 Author Report Share Posted June 4, 2010 John thanks for the suggestions. I will implement and test it out.Regards 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.