Jump to content
UBot Underground

Help Me Guys, Multi Threading In Socket Is Not Working


Recommended Posts

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,password1

domain 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

Link to post
Share on other sites

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

Link to post
Share on other sites

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,password1

domain 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)
        }
    }
}
Link to post
Share on other sites

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 {
        }
    }
}

Link to post
Share on other sites

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 by nepzworld
Link to post
Share on other sites

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

Link to post
Share on other sites

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.

Link to post
Share on other sites

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

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