Jump to content
UBot Underground

Run a command every X times


Recommended Posts

How I can run a particular command every X times? I mean:

I have a list of urls to be visited and every X urls the bot should change the IP.

 

I've set it like:

if the current url visited is the number X then change IP, with the $comparison function.

 

What I need is something like:

If url visited is the number 5 or a multiple then change IP.

 

So that the after the 5th url, there is an IP change, after the 10th there is an IP change and so on...

 

Suggestions?

Link to post
Share on other sites

set variable 1

loop list total urls

{

if(variable = X nunber)

than change proxy set variable 1

else increment variable

navigate list item

}

 

And this will change the IP every X urls right?

I'm trying to add it to my project but I want to understand it first :)

Link to post
Share on other sites

yes it will

 

the above isn't actual code here is the actual code to use

 

set(#temp, 5, "Global")
loop($list total(%name)) {
    comment("change 5 in the comparison below to the 
number of urls you want to loop before it changes")
    if($comparison(#temp">=", 5)) {
        then {
            change proxy("None")
            set(#temp, 1, "Global")
        }
        else {
            increment(#temp)
        }
    }
}

 

 

 

This ensures it changes before first url.
otherwise if you dont want to change on first set of urls, change the first set variable for temp to 1

  • Like 1
Link to post
Share on other sites

yes it will

 

the above isn't actual code here is the actual code to use

 

set(#temp, 5, "Global")

loop($list total(%name)) {

    comment("change 5 in the comparison below to the 

number of urls you want to loop before it changes")

    if($comparison(#temp">=", 5)) {

        then {

            change proxy("None")

            set(#temp, 1, "Global")

        }

        else {

            increment(#temp)

        }

    }

}

 

 

 

This ensures it changes before first url.

otherwise if you dont want to change on first set of urls, change the first set variable for temp to 1

It worked :)

 

Thank you so much TJ!

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