Jump to content
UBot Underground

[Sell] - Ubot Comminication Plugin - Browser Control (Pro) Use Chrome / Ff Etc - Run Code On / Control External Bots, Web Server Control (Pro) + More


Recommended Posts

Just gotta say this is by far the best plugin ive ever used for uBot. Excellent work! Quick question as far as multithreading and server connections go. I have a PHP script that is calling uBot with multi requests at the same time.

 

So lets just say for example im using uBot to create Tumblr accounts. Now I launch the same PHP script multiple times but sending different account information each time. The PHP scripts are calling the same bot at the same time opening new threads on the bot for each PHP connection. I need uBot to return the correct account information to the correct PHP connection that spawned the thread. I just want to clarify, if I put each thread inside the "Lock" command will that lock that thread to the same PHP connection that spawned the thread? So since its the same PHP script calling the same define launching multithreads will the Lock command be able to know which php connection belongs to which thread? Hopefully you understand what I mean by this. 

Link to post
Share on other sites
  • Replies 440
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

>>Quick Update<<   A Team of 3 advanced Ubot Developers have taken over the project. We purchased the source code and full rights to it. We are now analyzing the source code and looking t

The first 5 tutorial videos are available (FREE)   http://www.bot-factory.com/downloads/communication-plugin-tutorials I cover a lot of the basics first. But we will move into more complex things as w

Version 2.9.7.2 Fixed: HTTP proxy authentication with Chrome   Update is now available on JVZOO It was allot of work to release this update and also would like to thank everyone for there patience an

Posted Images

Is there a way to test if a server is running so I can display an alert if not, instead of getting the 'Unable to connect to remote server' message?

 

Not at the moment. But I already asked DW for this feature. And I think he has it on the list.

Dan

  • Like 1
Link to post
Share on other sites

That was the golden nugget of information I was looking for :)

But that should also be explained in the example you receive with it.

 

 

Just gotta say this is by far the best plugin ive ever used for uBot. Excellent work! Quick question as far as multithreading and server connections go. I have a PHP script that is calling uBot with multi requests at the same time.

 

So lets just say for example im using uBot to create Tumblr accounts. Now I launch the same PHP script multiple times but sending different account information each time. The PHP scripts are calling the same bot at the same time opening new threads on the bot for each PHP connection. I need uBot to return the correct account information to the correct PHP connection that spawned the thread. I just want to clarify, if I put each thread inside the "Lock" command will that lock that thread to the same PHP connection that spawned the thread? So since its the same PHP script calling the same define launching multithreads will the Lock command be able to know which php connection belongs to which thread? Hopefully you understand what I mean by this.

No a lock is not designed to lock and identify a connection, to see what locks are and what they do check the how to out.

 

What you want though is of course possible, check out the code below.

 

http://i.imgur.com/vD3i7HN.png

define DefineToBeCalledByPHP(#context) {

    set(#requestData,$plugin function("Communication.dll""$get request data"#context),"Local")

    comment("All work done here makes the client sending the request wait")

    plugin command("Communication.dll""return response"#context"Received data")

    comment("After we return response the connection will close")

    comment("So all work done after return response will not make the client wait")

    comment("Here we do some fictional work")

    set(#workData,"data that needs to be send to the php server","Local")

    comment("Here we send the data gatherd by the work back to the php server")

    set(#requestResponse,$plugin function("Communication.dll""$send server request""http://myserver.tld/reportworkdata.php"#workData),"Local")

    comment("Possibility\'s for keeping a track of the work is giving it a id with which php can identify it.

For example a id from a database record.")

}

 

 

 

Is there a way to test if a server is running so I can display an alert if not, instead of getting the 'Unable to connect to remote server' message?

If it would return a text containing "-1" or "unable to connect" from the function itself would that be enough?

Edited by diskwizz
Link to post
Share on other sites

true if connection is successful

false if not

 

Because if it returns true when it's successful we could directly do:

 

if($plugin function("Communication.dll""$send request""192.99.44.22", 8080, "xxx""aaa")) {
    then {
        alert("working")
    }
    else {
        alert("not working")
    }
}

 

If you return a different text, we would have to work with the comparison function. Which would make the code a bit more complicated. 

Thanks

Dan

Link to post
Share on other sites

true if connection is successful

false if not

 

Because if it returns true when it's successful we could directly do:

 

if($plugin function("Communication.dll""$send request""192.99.44.22", 8080, "xxx""aaa")) {

    then {

        alert("working")

    }

    else {

        alert("not working")

    }

}

 

If you return a different text, we would have to work with the comparison function. Which would make a bit more complicated. 

 

Thanks

Dan

It cannot respond with true because it responds with the response from whoever you did the request to.

Link to post
Share on other sites

...

 

If it would return a text containing "-1" or "unable to connect" from the function itself would that be enough?

 

true if connection is successful

false if not

 

Because if it returns true when it's successful we could directly do:

 

if($plugin function("Communication.dll""$send request""192.99.44.22", 8080, "xxx""aaa")) {

    then {

        alert("working")

    }

    else {

        alert("not working")

    }

}

 

If you return a different text, we would have to work with the comparison function. Which would make the code a bit more complicated. 

 

Thanks

Dan

 

I think returning a specific text string like '-1' or "unable to connect" would be best because a true/false would conflict with the existing structure of the function. It currently return what ever the server send back - if I understand it right.

Link to post
Share on other sites

I think returning a specific text string like '-1' or "unable to connect" would be best because a true/false would conflict with the existing structure of the function. It currently return what ever the server send back - if I understand it right.

Yes, it responds back whatever the server sends back. So you could check if the response does not equals -1 and run your script. If it then does equal -1 you know there is a error.

Edited by diskwizz
Link to post
Share on other sites

Ok so right now if there is a error it will respond like in the image below.
 
http://i.imgur.com/jcaihxK.png

To work with that i added "$starts with" and "$ends with". These are Qualifier Functions and return "true" or "false". Basically it checks if a given text starts or ends with a certain text. The new functions are shown here below.

http://i.imgur.com/xeKlKhN.png


Here is a small example of how to use it.

http://i.imgur.com/kgyI2ws.png

Just let me know what you guy's think about it.

Edited by diskwizz
Link to post
Share on other sites

Couldn't we just use:

If.. contains  "error:Unabel to connect to"

 

Or why do we need a new function here?

Because there can be different error messages describing you whats wrong. There can be more wrong then just "Unable to connect", like "Unable to resolve domain" etc.

 

The function "$contains" looks trough all the code and this functions just at the beginning of the text.

Link to post
Share on other sites

When a server bot is called it could take quite a long time to run. In my testing I am seeing a timeout at around the 100 seconds if the server does not respond in that time frame.

 

Is there a way to increase / decrease the Timeout period?

Is there a way to keep the connection alive?

 

This is the scenario I have...

 

Controller bot loops through a list of URL's and calls a server bot for each url in the list

The Server bot can some time takes 10 seconds to do it processing before returning the results to the controller. But other times it could take 5 mins or 10 mins etc..

So anything above the 100 seconds limit i am seeing at the moment causes a time out error and the link between controller and server is broken.

I have additional follow-on processes where the controller will call other server bots afterwards.

 

Can you give some advise on how I can handle this?

 

Thanks,

Pete

Edited by Pete_UK
Link to post
Share on other sites

Is there a way to have a controller bot run a server bot multiple times simultaneously, passing data as needed ?

 

EDIT: After watching some of the videos again... I guess this is where the Dynamic Worker bot scenario comes in, right?

Edited by Pete_UK
Link to post
Share on other sites

Hey thanks for the explanation! Would be great if the threading could keep track of the PHP connection in the same way a browser with multiple tabs can. Not sure how difficult this would be to implement but it would be great option so that a PHP could launch and finish the task as if uBot was just an extension of the PHP script. As it is now its fine for some tasks but for certain tasks that require a PHP connection to return a value from the same script it requires constant looping to wait to find the correct returned file or database entry to return the correct info. With that said this is an amazing plugin, just a thought of a useful addition that could be added.

 

But that should also be explained in the example you receive with it.
 
 

No a lock is not designed to lock and identify a connection, to see what locks are and what they do check the how to out.

What you want though is of course possible, check out the code below.

 

http://i.imgur.com/vD3i7HN.png

define DefineToBeCalledByPHP(#context) {
    set(#requestData,$plugin function("Communication.dll""$get request data"#context),"Local")
    comment("All work done here makes the client sending the request wait")
    plugin command("Communication.dll""return response"#context"Received data")
    comment("After we return response the connection will close")
    comment("So all work done after return response will not make the client wait")
    comment("Here we do some fictional work")
    set(#workData,"data that needs to be send to the php server","Local")
    comment("Here we send the data gatherd by the work back to the php server")
    set(#requestResponse,$plugin function("Communication.dll""$send server request""http://myserver.tld/reportworkdata.php"#workData),"Local")
    comment("Possibility\'s for keeping a track of the work is giving it a id with which php can identify it.
For example a id from a database record.")
}

Link to post
Share on other sites

When a server bot is called it could take quite a long time to run. In my testing I am seeing a timeout at around the 100 seconds if the server does not respond in that time frame.

 

Is there a way to increase / decrease the Timeout period?

Is there a way to keep the connection alive?

 

This is the scenario I have...

 

Controller bot loops through a list of URL's and calls a server bot for each url in the list

The Server bot can some time takes 10 seconds to do it processing before returning the results to the controller. But other times it could take 5 mins or 10 mins etc..

So anything above the 100 seconds limit i am seeing at the moment causes a time out error and the link between controller and server is broken.

I have additional follow-on processes where the controller will call other server bots afterwards.

 

Can you give some advise on how I can handle this?

 

Thanks,

Pete

This new update should solve your issue.

http://i.imgur.com/MZURH2p.png

 

Hey thanks for the explanation! Would be great if the threading could keep track of the PHP connection in the same way a browser with multiple tabs can. Not sure how difficult this would be to implement but it would be great option so that a PHP could launch and finish the task as if uBot was just an extension of the PHP script. As it is now its fine for some tasks but for certain tasks that require a PHP connection to return a value from the same script it requires constant looping to wait to find the correct returned file or database entry to return the correct info. With that said this is an amazing plugin, just a thought of a useful addition that could be added.

Could you send me a code snippet that demonstrates the current limitation? Perhaps I'm understanding you wrong but some code would help me to see what you mean.

Link to post
Share on other sites

Is there a way to have a controller bot run a server bot multiple times simultaneously, passing data as needed ?

 

EDIT: After watching some of the videos again... I guess this is where the Dynamic Worker bot scenario comes in, right?

 

Yes, with the dynamic worker bot scenario you can start a "mindless" bot so to say, that reads the parameter you send it and executes the raw Ubot code.

Link to post
Share on other sites

This new update should solve your issue.

http://i.imgur.com/MZURH2p.png

 

Perfect.

 

Yes, with the dynamic worker bot scenario you can start a "mindless" bot so to say, that reads the parameter you send it and executes the raw Ubot code.

 

Thought so. Thanks for confirming.

 

A tip of my hat to you for making this plugin. Opens up so many doors. And the support.... outstanding!

Link to post
Share on other sites

Update:  V2.6.3.1

 

Please download the update from Jvzoo   http://customer.jvzoo.com

 

 

Version 2.6.3.1
Added: $start with, returns "true" or "false" if a text starts with a given text
Added: $ends with, returns "true" or "false" if a text ends with a given text
Updated: $send request, has now a timeout parameter
Updated: $send server request, has now a timeout parameter
Updated: $send request, returns now "error: error msg" if there was a error during sending or receiving the request
Updated: $send server request, returns now "error: error msg" if there was a error during sending or receiving the request
Link to post
Share on other sites

Perfect.

 

 

Thought so. Thanks for confirming.

 

A tip of my hat to you for making this plugin. Opens up so many doors. And the support.... outstanding!

 

 

Thanks Pete,  we aim to please!

Link to post
Share on other sites

How to do load cookies?? I just tried but didn't work .... 

Here what I doing : use CBrowser to login youtube and save CBrowser cookies... then load the cookies saved, and navigate to CBrowser but i got the youtube is not logged in... Please if you've an example ... 

Edited by awpramono
Link to post
Share on other sites

How to do load cookies?? I just tried but didn't work .... 

Here what I doing : use CBrowser to login youtube and save CBrowser cookies... then load the cookies saved, and navigate to CBrowser but i got the youtube is not logged in... Please if you've an example ... 

Yeah currently im still thinking how i should handle the cookies internally, for now you first have to load the page then load the cookies and refresh the page.

 

I'm working on solving this issue though, but this is the current work around for it.

Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×
×
  • Create New...