Jump to content
UBot Underground

Reddit account creation help


Recommended Posts

Hi Guys,

 

I am trying to make what I thought was going to be a simple bot to practice using ubot. My bot was just going to make a Reddit account for me. My problem is that I am finding it hard to confirm whether the captcha was entered correctly or not.

 

I am using the loopwait command and trying to scrape for the innertext that is displayed once you enter an incorrect captcha. The only thing is Ubot can't seem to pick up this text that Reddit displays when you enter a wrong captcha.

 

Has anyone managed to do this or think of another way to see if the captcha was entered correctly? As obviously I want the bot to be at least a little but intelligent and not just move onto the next part of the script thinking that an account has been created when it hasn't.

 

Thanks for your help.

Ant

Link to post
Share on other sites

try this..

 

clear cookies
reset account("Any")
navigate("https://ssl.reddit.com/login?dest=%2Fsubmit", "Wait")
type text($element offset(<username field>, 0), $account data("Username"), "Standard")
type text(<email field>, $account data("Email"), "Standard")
type text($element offset(<password field>, 0), $account data("Password"), "Standard")
type text($element offset(<password field>, 1), $account data("Password"), "Standard")
type text(<name="captcha">, $solve captcha(<class="capimage">), "Standard")
click(<create account button>, "Left Click", "No")
wait for browser event("Everything Loaded", "")
if($exists(<innertext="logout">)) {
   then {
       comment("log account data here")
   }
   else {
       loop while($not($exists(<innertext="logout">))) {
           type text(<name="captcha">, $solve captcha(<class="capimage">), "Standard")
           click(<create account button>, "Left Click", "No")
           wait for browser event("Everything Loaded", "")
       }
   }
}

Link to post
Share on other sites

try this..

 

clear cookies
reset account("Any")
navigate("https://ssl.reddit.com/login?dest=%2Fsubmit", "Wait")
type text($element offset(<username field>, 0), $account data("Username"), "Standard")
type text(<email field>, $account data("Email"), "Standard")
type text($element offset(<password field>, 0), $account data("Password"), "Standard")
type text($element offset(<password field>, 1), $account data("Password"), "Standard")
type text(<name="captcha">, $solve captcha(<class="capimage">), "Standard")
click(<create account button>, "Left Click", "No")
wait for browser event("Everything Loaded", "")
if($exists(<innertext="logout">)) {
   then {
       comment("log account data here")
   }
   else {
       loop while($not($exists(<innertext="logout">))) {
           type text(<name="captcha">, $solve captcha(<class="capimage">), "Standard")
           click(<create account button>, "Left Click", "No")
           wait for browser event("Everything Loaded", "")
       }
   }
}

 

That worked. Thanks for your help.

Link to post
Share on other sites

***I have a somewhat temporary fix at the moment which is just putting in a wait command for 5 seconds. Obviously If I ever decide to use proxies then this may not work as they may be slower than my connection.***

 

 

 

That worked. Thanks for your help.

 

OK guys I am still having problems with this. When the script creates the account it for some reason can't find the "logout" text on the page fast enough and so generates a new username and password and saves that to file even though one has already been successfully created on Reddit. It then pops up the captcha box again (with no image inside).

 

Has anyone got any ideas why this is and why even though there is a "logout" element on the page it ignores it the first time round and saves a new set of username and password?

 

I can't figure it out, its really bugging me. :(

 

define CreateReddit(#HotmailEmail) {
   clear cookies
   reset account("Any")
   navigate("https://ssl.reddit.com/login?dest=%2Fsubmit", "Wait")
   type text($element offset(<username field>, 0), $account data("Username"), "Standard")
   type text(<email field>, #HotmailEmail, "Standard")
   type text($element offset(<password field>, 0), $account data("Password"), "Standard")
   type text($element offset(<password field>, 1), $account data("Password"), "Standard")
   type text(<name="captcha">, $solve captcha(<class="capimage">), "Standard")
   click(<create account button>, "Left Click", "No")
   wait for browser event("Everything Loaded", 10)
   if($exists(<innerhtml="logout">)) {
       then {
           save to file("C:\\Users\\Ant\\Documents\\REDDITACCOUNT.CSV", "{$account data("Username")},{$account data("Password")}")
           set(#status, "Reddit Account Created", "Global")
       }
       else {
           loop while($not($exists(<innerhtml="logout">))) {
               reset account("Any")
               wait(2)
               change attribute(<username field>, "value", "")
               type text($element offset(<username field>, 0), $account data("Username"), "Standard")
               change attribute(<name="captcha">, "value", "")
               type text(<name="captcha">, $solve captcha(<class="capimage">), "Standard")
               click(<create account button>, "Left Click", "No")
               wait for browser event("Everything Loaded", "")
           }
           save to file("C:\\Users\\Ant\\Documents\\REDDITACCOUNT.CSV", "{$account data("Username")},{$account data("Password")}")
           set(#status, "Reddit Account Created", "Global")
           wait for browser event("Everything Loaded", "")
       }
   }
}

Link to post
Share on other sites

add a wait for element, logout

after creating the account, and set a timeout period of say 15-20 seconds or so to make sure to give it enough time to submit, and come up with the page.

 

stead of just wait everything loaded, as using the click element sometimes sites with jquery it wont reload the page there fore ubot thinks its already loaded, and wont wait.

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