Jump to content
UBot Underground

multithreading account signup from many different sites


Recommended Posts

I am very familiar with TJ's tutorial on multithreading and I refer to it every time I set up multithreading.  However, it is created with the assumption that you're multithreading the same task on the same website.  What if you are signing up accounts on many different sites? Something like senuke, but on a much smaller scale.  How would you go about this with multithreading?

 

Would you do something like assign a number to each define command for each site you are creating accounts at?  Like, onload it sets numbers to each custom command.  Then it increments and runs one command per thread?  Am I thinking about this the right way or is there a better way to do this?

 

Sorry I don't have any code examples atm, I'm just thinking outloud right now.  I will probably get to the multithreading part of my bot in the next couple of days and I'm not really sure how I should implement this.

Link to post
Share on other sites

Anyone?  I'm really stuck on this.  I can't add my custom commands to a list.  I'm not really sure how to approach this one, aside from writing the code so it creates a new thread for each custom command.  But then, how would I control the number of threads that are open?

Link to post
Share on other sites

First you need a database of all the urls, then a way to identify each one to a platform, then write a define or defines for each platform, thats it 
 

Link to post
Share on other sites

Here is the way I would code that...

 

Build a DEFINE for each site you want to signup to.

Add the Signup DEFINE names to a list of names - these will further act as On/Off switches.

 

LOOP through the list and extract the current list position DEFINE NAME from it, then use a sequential IF THEN ELSE IF series of comparisons, so that within each branch of that IF only one DEFINE could be called, respectively the one that has the name the same as the current looping list item.

 

Once found, Call that DEFINE (signup logic) in a new thread (for multithreading) and at the same time, delete the item (DEFINE Name) from the list you are looping through.

 

On the other hand, each Signup DEFINE should end their own process, by adding their DEFINE's Name at the end of Signup DEFINEs LIST.

 

This way, the list act pretty much like a conveyor belt.

 

Every time you fire up a specific DEFINE in a new thread, that DEFINE's name is deleted from the top of the list, while every time a thread finishes its job, that particular DEFINE re-adds its own name at the bottom of the list.

 

The list will be as long as many DEFINEs you have, but the LOOPing can be confined to a less number of threads if you want, by using a LOOP WHILE instead.

 

^^ All this is the basic concept, you will have to code it yourself. I wanted to provide some sample code, but unfortunately I have to run some place with some business, so I don't have time now.

 

If you encounter any troubles implementing this idea, let me know and I might write some code later.

 

Good luck with it!

 

Cheers

  • Like 1
Link to post
Share on other sites

Here is the way I would code that...

 

Build a DEFINE for each site you want to signup to.

 

Add the Signup DEFINE names to a list of names - these will further act as On/Off switches.

 

LOOP through the list and extract the current list position DEFINE NAME from it, then use a sequential IF THEN ELSE IF series of comparisons, so that within each branch of that IF only one DEFINE could be called, respectively the one that has the name the same as the current looping list item.

 

Once found, Call that DEFINE (signup logic) in a new thread (for multithreading) and at the same time, delete the item (DEFINE Name) from the list you are looping through.

 

On the other hand, each Signup DEFINE should end their own process, by adding their DEFINE's Name at the end of Signup DEFINEs LIST.

 

This way, the list act pretty much like a conveyor belt.

 

Every time you fire up a specific DEFINE in a new thread, that DEFINE's name is deleted from the top of the list, while every time a thread finishes its job, that particular DEFINE re-adds its own name at the bottom of the list.

 

The list will be as long as many DEFINEs you have, but the LOOPing can be confined to a less number of threads if you want, by using a LOOP WHILE instead.

 

^^ All this is the basic concept, you will have to code it yourself. I wanted to provide some sample code, but unfortunately I have to run some place with some business, so I don't have time now.

 

If you encounter any troubles implementing this idea, let me know and I might write some code later.

 

Good luck with it!

 

Cheers

Crap, now my bot won't open in ubot.  Here's what I did: I created an if then node for each define name (which was added to a list).  in the 'else' I put the next if then statement.  I did this about 11 layers deep.  Because the first command under THEN was remove list item from list at the current list position.  That's why I couldn't just put a bunch of if then's straight down on the same level, because it's removing the current list position so then each thread will go through each of defines, rather than only one.  

 

One of the "IF THEN" statements was crashing ubot when I moved it into the else statement.  This was number 11 or 12.  So anyways, it just crashed for like the fourth time in a row and I was just going to open ubot and get rid of this node thinking it's just this specific one.  However, now when I try to open my bot in ubot it doesn't load and just crashes.  I will send it to support with a ticket, but I'm not sure what they can do because I'm not sure if they might have a way of opening it when I can't.

 

Here is an example similar to the code I had.  I put all the multithreading (see http://www.ubotstudio.com/forum/index.php?/topic/10042-new-v4-tutorial-multi-threading-example/).  Is this what you were talking about, or did I mess something up?

 

startup()
registration code here()
define registration code here {
    if($comparison(#num created, "<", #number accounts)) {
        then {
            comment("PLACE YOUR CODE TO ME MULTI THREADED HERE")
            if($comparison($list item(%define_commands, #position), "=", "AccountSignupA")) {
                then {
                    remove from list(%define_commands, #position)
                    AccountSignupA()
                }
                else {
                    if($comparison($list item(%define_commands, #position), "=", "AccountSignupB")) {
                        then {
                            remove from list(%define_commands, #position)
                            AccountSignupB()
                        }
                        else {
                            if($comparison($list item(%define_commands, #position), "=", "AccountSignupC")) {
                                then {
                                    remove from list(%define_commands, #position)
                                    AccountSignupC()
                                }
                                else {
                                }
                            }
                        }
                    }
                }
            }
        }
        else {
        }
    }
}
define startup {
    add list to list(%define_commands, $list from text("AccountSignupA,AccountSignupB,AccountSignupC", ","), "Delete", "Global")
    set(#position, 0, "Global")
}
define AccountSignupA {
    navigate("http://www.sitea.com", "Wait")
}
define AccountSignupB {
    navigate("http://www.siteb.com", "Wait")
}
define AccountSignupC {
    navigate("http://www.sitec.com", "Wait")
}

Link to post
Share on other sites

You should NOT write the code with so many nested IFs, use the sequence IF THEN ELSE IF instead, like below:
 

            if($comparison(.................)) {
                then {
                    remove from list(%define_commands, #position)
                    AccountSignup1()
                }
                else if($comparison(.................)) {
                    remove from list(%define_commands, #position)
                    AccountSignup2()
                }
                else if($comparison(.................)) {
                    remove from list(%define_commands, #position)
                    AccountSignup3()
                }
                else if($comparison(.................)) {
                    remove from list(%define_commands, #position)
                    AccountSignup4()
                }
                .
                .
                .
                .
                .
                else if($comparison(.................)) {
                    remove from list(%define_commands, #position)
                    AccountSignup49()
                }
                else {
                    remove from list(%define_commands, #position)
                    AccountSignup50()
                }
            }

...so that all of them are on the same 'level'.

 

Deep nesting of IFs like you described will surely crash your UBS, even sooner if you use drag'n'drop in Node View than if you code directly on Code View.

 

As for the crashed bot, you should try to open the archive with some unzip utility and then remove the nested IFs, so that UBS would be able to open the file (or even copy/paste everything except the nested IFs into a new bot)

 

Hope this helps...

 

Cheers!

Link to post
Share on other sites

Ahhh, nice...  I never knew I could look at source code with a zip utility.  Cool, I got it open now.  Yeah, I figured I was doing it wrong.  I should be able to get this working now :)

  • Like 1
Link to post
Share on other sites

Great question, and great solution from VaultBoss. I was just about to try and do the same sorta thing and have not seen any examples on a good way to do it. Thanks!

  • Like 1
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...