nepzworld 0 Posted June 29, 2018 Report Share Posted June 29, 2018 Help me Guys, Multi threading in Socket is not working . I was trying to login to the list of site that is stored in a .csv file like this: domain name1,username1,password1domain name 2,username2,passwrod2... there are 30-50 rows with different domain and different userid and password. I wanted to use multithreading but it is not working as it is supposed to. Different thread should pick up different domain but threads are picking same domain multiple times. So, anyone ? who have been to this issue before and solved it? please help me here Thank you Quote Link to post Share on other sites
hare ram 23 Posted June 29, 2018 Report Share Posted June 29, 2018 Check properly you take list of login is incremented or not in each thread..?? Quote Link to post Share on other sites
nepzworld 0 Posted June 29, 2018 Author Report Share Posted June 29, 2018 Check properly you take list of login is incremented or not in each thread..?? sometimes it works sometime it takes same domain multiple times... i even tried to use thread counter plugin but no success... I just want each thread to open unique domain... Quote Link to post Share on other sites
hare ram 23 Posted June 29, 2018 Report Share Posted June 29, 2018 (edited) I can't help without see your code why this error occurs so can you show your code? Edited June 29, 2018 by hare ram Quote Link to post Share on other sites
nepzworld 0 Posted June 29, 2018 Author Report Share Posted June 29, 2018 I can't help without see your code why this error occurs so can you show your code? thank you for your quick reply, here you go login file is in the format: domain name1,username1,password1domain name 2,username2,passwrod2... ui open file("Login File",#loginfile) clear table(&login) create table from file(#loginfile,&login) set(#thread_counter,0,"Global") set(#row,0,"Global") loop($table total rows(&login)) { increment(#thread_counter) thread { Run Script($table cell(&login,#row,0), $table cell(&login,#row,1), $table cell(&login,#row,2)) decrement(#thread_counter) if($comparison(#thread_counter,"= Equals",0)) { then { alert("DONE!!") } else { } } } wait(2) increment(#row) } define Run Script(#url, #email, #password) { in new browser { plugin command("SocketCommands.dll", "socket container") { plugin command("SocketCommands.dll", "socket set header", "User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0") set cookie("xg_cookie_check",1) plugin command("SocketCommands.dll", "socket add parameter", "emailAddress", #email) plugin command("SocketCommands.dll", "socket add parameter", "password", #password) plugin command("SocketCommands.dll", "socket navigate", "POST", "{#url}/signin") wait(5) } } } Quote Link to post Share on other sites
hare ram 23 Posted June 29, 2018 Report Share Posted June 29, 2018 Simply go to this example and watch video you better understand brohttp://network.ubotstudio.com/forum/index.php/topic/21405-multithreading-tutorial-how-to-multithread-the-right-way/ Quote Link to post Share on other sites
nepzworld 0 Posted June 29, 2018 Author Report Share Posted June 29, 2018 yes bro, i have seen that tutorial, it works great for same domain, but if its different domain for each thread, then it gets messy... Quote Link to post Share on other sites
hare ram 23 Posted June 29, 2018 Report Share Posted June 29, 2018 ui open file("Accounts",#login)clear list(%login)add list to list(%login,$list from text($read file(#login),$new line),"Delete","Global")set list position(%login,0)ui drop down("Thread Count","1,2,3,4,5,6,7,8,9,10",#num threads)set(#used threads,0,"Global")loop($list total(%login)) { loop while($comparison(#used threads,">=",#num threads)) { wait(1) } loop process()}define loop process { increment(#used threads) registration procedure()}define registration procedure { thread { in new browser { registration code here() decrement(#used threads) } }}define registration code here { add list to list(%local,$list from text($next list item(%login),$new line),"Delete","Local") if($comparison(#num created,"<=",$list total(%login))) { then { set(#cur account position,#account position,"Local") increment(#account position) navigate($list item(%local,0),"Wait") wait(5) click(<login button>,"Left Click","No") wait(3) type text(<email field>,$list item(%local,1),"Standard") type text(<password field>,$list item(%local,2),"Standard") click(<login button>,"Left Click","No") wait(5) } else { } }} Quote Link to post Share on other sites
nepzworld 0 Posted June 29, 2018 Author Report Share Posted June 29, 2018 no its not working, its navigating with url: "http://domain,username,password" Quote Link to post Share on other sites
hare ram 23 Posted June 29, 2018 Report Share Posted June 29, 2018 i checked code is working for different2 domain in different 2 thread... Quote Link to post Share on other sites
nepzworld 0 Posted June 29, 2018 Author Report Share Posted June 29, 2018 what is your login file format? mine is domain,username,password Quote Link to post Share on other sites
hare ram 23 Posted June 29, 2018 Report Share Posted June 29, 2018 https://www.youtube.com/ username1 password1 https://www.google.com/ username2 password2 https://in.yahoo.com/?p=us username3 password3 In csv format Quote Link to post Share on other sites
nepzworld 0 Posted June 29, 2018 Author Report Share Posted June 29, 2018 is it space in between? or is it separated with comma? Quote Link to post Share on other sites
hare ram 23 Posted June 29, 2018 Report Share Posted June 29, 2018 no not any space you put these in csv format you see in debugger bot is automatically take separated with comma Quote Link to post Share on other sites
nepzworld 0 Posted June 29, 2018 Author Report Share Posted June 29, 2018 (edited) ok check this: ui open file("Accounts",#login) clear list(%login) add list to list(%login,$list from text($read file(#login),$new line),"Delete","Global") set list position(%login,0) ui drop down("Thread Count","1,2,3,4,5,6,7,8,9,10",#num threads) set(#used threads,0,"Global") loop($list total(%login)) { loop while($comparison(#used threads,">=",#num threads)) { wait(1) } loop process() } define loop process { increment(#used threads) registration procedure() } define registration procedure { thread { in new browser { registration code here() decrement(#used threads) } } } define registration code here { add list to list(%local,$list from text($next list item(%login),$new line),"Delete","Local") if($comparison(#num created,"<=",$list total(%login))) { then { set(#cur account position,#account position,"Local") increment(#account position) set(#url,$list item(%local,0),"Local") set(#username,$list item(%local,1),"Local") set(#password,$list item(%local,2),"Local") alert("{#url}:{#username}:{#password}") } else { } } } my csv file is in format: https://www.youtube.com/,username1,password1 https://www.google.com/,username2,password2 https://in.yahoo.com/?p=us,username3,password3 and when i run the program, it displays: https://www.youtube.com/,username1,password1:: but it should have displayed: https://www.youtube.com:username1:password1 Edited June 29, 2018 by nepzworld Quote Link to post Share on other sites
hare ram 23 Posted June 29, 2018 Report Share Posted June 29, 2018 ping me my skype id::--live:71826713e7a729e6 Quote Link to post Share on other sites
nepzworld 0 Posted June 29, 2018 Author Report Share Posted June 29, 2018 (edited) ok , i have sent message in skype, i have sent you an invitaion, my skype id is nepzworld please accept Edited June 29, 2018 by nepzworld Quote Link to post Share on other sites
UBotBuddy 331 Posted June 29, 2018 Report Share Posted June 29, 2018 I'm not a Socket coder at all but I have done a few Threads. I will say this. You need to work from the inside out. Make absolutely sure that your Socket is running perfectly before you start adding the Thread element to the mix. The biggest frustration for botters is trying to debug too many things at once. Case in point. There have been many botters who think the Define command is a Subroutine. While it can function in that manner what I have seen is that programmers will jam a pile of commands & functions into a Define and then it breaks. They are overwhelmed trying to debug it because they cannot trace out the error. Always test out your code before you start using specialized commands like Define, Thread and Socket. Just my thoughts... Buddy Quote Link to post Share on other sites
nepzworld 0 Posted June 29, 2018 Author Report Share Posted June 29, 2018 socket is still using same domain again and again.... anything to fix this issue? Quote Link to post Share on other sites
HelloInsomnia 1103 Posted June 29, 2018 Report Share Posted June 29, 2018 Just a heads up that the socket commands are not very feature rich and generally people use HTTP Post Plugin instead. It's a paid plugin though, the Heopas Plugin has some HTTP commands as well and that one is free. Quote Link to post Share on other sites
nepzworld 0 Posted June 30, 2018 Author Report Share Posted June 30, 2018 Yes i guess, socket does not work well with multi threading, but with single thread, it is working like a charm and lot faster, but i have table with 100 rows so its taking too much time too.... 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.