Jump to content
UBot Underground

Tutorial On Changing Proxies


Recommended Posts

I am trying to augment the proxy changing tutorial a bit, but for some odd reason it does not work properly. I did everything almost exactly the same, except for using a ui block text as opposed to a list. Here is what I have:

 

ui block text("List of Proxies (ip:port)",#lstpxy)
ui stat monitor("List Pos:",#listpos)
define Nav1 {
    clear cookies
    clear list(%mylist)
    add list to list(%mylist,$list from text(#lstpxy,$new line),"Delete","Global")
    set list position(%mylist,0)
    set(#listpos,0,"Global")
    loop($list total(%mylist)) {
        clear cookies
        change proxy($next list item(%mylist))
        navigate("http://www.whatismyip.com","Wait")
    }
    increment(#listpos)
}
Nav1()

 

 

 

What could I be doing wrong?

Tutorial on Changing Proxies.ubot

Link to post
Share on other sites

Try this...

 

ui block text("List of Proxies (ip:port)",#lstpxy)
ui stat monitor("List Pos:",#listpos)
define Nav1 {
    clear cookies
    clear list(%mylist)
    add list to list(%mylist,$list from text(#lstpxy,$new line),"Delete","Global")
    set(#listpos,0,"Global")
    loop($list total(%mylist)) {
        clear cookies
        change proxy($list item(%mylist,#listpos))
        navigate("http://www.whatismyip.com","Wait")
        increment(#listpos)
    }
}
Nav1()

needed the increment in the loop

 

If you use next list item
no need for a list position. one or the other , not both

set list position command is not necessary, but sometimes when debugging clear list doesnt work correctly as it should set list pos. back to zero.

 

this is another way...

 

ui block text("List of Proxies (ip:port)",#lstpxy)
ui stat monitor("List Pos:",$list position(%mylist))
define Nav1 {
    clear cookies
    clear list(%good)
    clear list(%bad)
    clear list(%mylist)
    add list to list(%mylist,$list from text(#lstpxy,$new line),"Delete","Global")
    loop($list total(%mylist)) {
        clear cookies
        comment("set it to use later 
like in add item to list or stat monitor")
        set(#proxy,$next list item(%mylist),"Global")
        change proxy(#proxy)
        navigate("http://www.whatismyip.com","Wait")
        comment("inside the if
put your condition to be met
;like a comparison
#proxy = proxy on page")
        if($comparison($scrape attribute(<innertext=w"*">,"innertext"),"=",#proxy)) {
            then {
                add item to list(%good,#proxy,"Delete","Global")
            }
            else {
                add item to list(%bad,#proxy,"Delete","Global")
            }
        }
        increment(#listpos)
    }
}
Nav1()

 

CD

Link to post
Share on other sites

Yes, but if you look in his OP you will see he is using the $next list item. So based on that code I'm pretty sure it wasn't working because he's using transparent proxies.

Link to post
Share on other sites

I indeed was testing with scrapebox gotten proxies (don't laugh, lol!), but the issue I was having was that it was looping without me being able to see the page load. And the monitor would go from 0 to 1 then back to 0, so I thought the loop was broken. Thank you both very much for the help! I am trying to drill this logic into my head and was sure I had misplaced something. Now I can go over this and get it understood right! Thanks guys! :)

 

 

Update Edit: Cool, pretty simple! That second one is a bit advanced and has proxy checking, I love it! Thanks a lot TC!

Link to post
Share on other sites

The fun of this all is in figuring out new examples of logic, which is why I love making bots. Now I am trying to isolate the proxy switching process from the page visiting, so they can be separate and function independently of each other. Just typing the idea here is a help to understanding exactly how to figure the logic. I am thinking of making the proxy change a defined command, and triggering it from the end of a page process, or something like that. It's a lot harder to think about than it sounds lol!

 

Edit: So I have figured a structure:

 

By creating each different needed function in its one command definition, I can debug future updates much easier and only change things that break.

  1. Start by loading a proxy from list, then navigating to url. (function ends and timer until next function)
  2. Next function defined will search the page and click something.
  3. Then it should pick the next proxy on the list and repeat the second step.

Though I get how the logic should work, I am still trying to figure out how to implement it best. This is basic function for any type of "like bot" or "hit bot", retweet functionality, etc. I hope that as I get this figured, the theory and my format helps others. I know that I have learned the most by searching for specific problems I have ran into, but they are never quite exact so there is a lot of improvising and guesswork. The more examples of different functions that are out on here, the better! So I try to make all of the things I learn an example. :D

Link to post
Share on other sites

Yes, but if you look in his OP you will see he is using the $next list item. So based on that code I'm pretty sure it wasn't working because he's using transparent proxies.

lol

 

When I cane to the thread there were no replies, I had not see yours till I posted and refreshed.

 

I didn't see the next list item until I made second example.

 

Steeler,

yes , there are many examples mate.

 

google

 

site:ubotstudio.com tutorials

 

where tutorials can be whatever

 

good luck buddy and you are welcome

 

CD

Link to post
Share on other sites

Oh, I have been searching with google and this forum for months now, so I know how it's done. Finding examples that directly relate to problems I have personally had, is about 10% or less success in searching. The rest is figuring out the missing parts on my own. Searching for how to split these functions up, for example, is not returning anything of value. Hence my current roadblock, lol.

 

 

 

Edit:

Search terms used so far:

 

change proxy after event

visit page and then change proxy

command triggers proxy switch from list

 

 

I am documenting as much here as possible as I build over the next few months. Hopefully helping others with similar problems. The more helpful content, the better this forum becomes. I hope to help in building the resources on how to use ubot successfully, because to me; the more active users, the better the program will get, and the more helpful and alive the forums will get. I have watched them over the years, and have been sadly disappointed in the lack of numbers and movement.

 

I know from working in advertising and sales, that a lot of people stay on the fence when they think a product is over their head. The more things they can solve by looking at the official forum of a product, the closer they get to actually hopping off that fence and buying. It is in my (and I assume all of us here) best interest, to see more people get on the ubot bandwagon and vitalize the community. This is my small way of helping that goal along. Soon, I plan to start on pdf tutorials of my own to give away in places like the warrior forum, etc. I just have to master a few things with ubot first. ;)

 

 

Edit:

Searching with "change proxy then navigate then change again"

I got:

http://www.ubotstudio.com/forum/index.php?/topic/15013-proxy-changing/

and

http://www.ubotstudio.com/forum/index.php?/topic/12800-efficient-proxy-coding-advice/

 

both were very helpful in furthering my understanding of how I can do what is needed. However, not the whole puzzle yet. I think spending the weekend tinkering will be a better bet now. I'll update with a solution as soon as I have it! :)

Link to post
Share on other sites

I am still trying to figure the best logic, with little progress. Due to my lack of understanding some key things, I believe. I have a general process for each different function, but still question how I am going to string them together with the most control. Right now, I have come up with 2 different ideas for the flow of functions.

 

function 1
loads a proxy from the list for use, checks it with a proxy source, if good it moves to next step, if no good it stops and reports bad proxy.


function 2
uses picked proxy in list, goes to page listed in UI, fully loads, then this function stops and waits.


function 3
searches page for right button, finds it and clicks it, then clicks category to leave page, it then goes to blank page with success message.

function 4
loop to function 1 now



or


function 1
Starts off script only, check all proxies in list against a proxy source, if all are good it moves to next step, if no good it stops and reports bad proxies.


function 2
Uses first picked proxy in list, goes to page listed in UI, fully loads, then this function stops and waits.


function 3
Searches page for right button, finds it and clicks it, then clicks category to leave page, it then goes to blank page with success message.

function 4
Changes proxy, clears browser, removes old proxy from list or skips it, then loops to function 2.

 

 

I am wondering which part to loop, and how I can best utilize the IF statement. I am also wondering which will be the most efficient method. Anyone have any ideas?

Link to post
Share on other sites

I am still trying to figure the best logic, with little progress. Due to my lack of understanding some key things, I believe. I have a general process for each different function, but still question how I am going to string them together with the most control. Right now, I have come up with 2 different ideas for the flow of functions.

 

function 1

loads a proxy from the list for use, checks it with a proxy source, if good it moves to next step, if no good it stops and reports bad proxy.

 

 

function 2

uses picked proxy in list, goes to page listed in UI, fully loads, then this function stops and waits.

 

 

function 3

searches page for right button, finds it and clicks it, then clicks category to leave page, it then goes to blank page with success message.

 

function 4

loop to function 1 now

 

 

 

or

 

 

function 1

Starts off script only, check all proxies in list against a proxy source, if all are good it moves to next step, if no good it stops and reports bad proxies.

 

 

function 2

Uses first picked proxy in list, goes to page listed in UI, fully loads, then this function stops and waits.

 

 

function 3

Searches page for right button, finds it and clicks it, then clicks category to leave page, it then goes to blank page with success message.

 

function 4

Changes proxy, clears browser, removes old proxy from list or skips it, then loops to function 2.

 

 

I am wondering which part to loop, and how I can best utilize the IF statement. I am also wondering which will be the most efficient method. Anyone have any ideas?

Anyone, any ideas? I am really stuck here. :(

Link to post
Share on other sites

I take it you are still using public proxy's if so you will never get a bullet proof solution

Because public proxy's can and do fail at any point

You are testing against loading browser pages which is slow

Try sockets with a proxy judge (which is faster and will tell you if the proxy is transparent or not)

With public proxy's looping the list total then reloading the list allows the end user to refresh the list is the bot is running for hours

Or you could use a while loop removing dead proxy's as you go this could stop the bot when you run out of good proxy's

 

Best option buy some working proxy's

No one can write this for you as you will need to adapt the proxy script to the bot you making at the time

Link to post
Share on other sites

Well thanks Zap, but my problem is past proxies now. If you read my last post, I am stuck trying to figure the logic flow of the bot I am currently working on. Any insight to that would be most helpful, and greatly appreciated. ;)

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