Jump to content
UBot Underground

proxy rotation problem


Recommended Posts

edit: I meant to put this in the support forum, mods feel free to move it if you believe it belongs there.

 

I am attempting to rotate through a list of private proxies and cannot get this to function correctly. It connects via the first proxy in the list and then does not change from that proxy. I am sure that the proxy ip/port/username/password is being updated at each cycle because I can view it in debugger. I read in some other threads about whatismyip.com caching data or something, so instead I'm connecting to a php script on one of my servers which simply logs the IP. The recorded IP never changes.

 

Another thread suggested using the command:

run javascript("location.reload(true);")

after changing the proxy; I did so but that did not help.

 

What am I doing wrong?

 

set(#i, 0, "Global")
ui stat monitor("iteration:", #i)
add list to list(%proxies, $list from file("C:\\Users\\Owner\\Desktop\\proxies.txt"), "Delete", "Global")
set list position(%proxies, 0)
loop($list total(%proxies)) {
   clear cookies
   increment(#i)
   set(#raw proxy data, $next list item(%proxies), "Global")
   clear list(%proxy data)
   add list to list(%proxy data, $list from text(#raw proxy data, ":"), "Delete", "Global")
   change proxy("{$list item(%proxy data, 0)}:{$list item(%proxy data, 1)}")
   if($comparison($list total(%proxy data), "=", 4)) {
       then {
           set proxy credentials($list item(%proxy data, 2), $list item(%proxy data, 3))
       }
   }
   run javascript("location.reload(true);")
   wait(3)
   navigate("http://ibuildbots.com/test/test.php", "Wait")
}

Link to post
Share on other sites

it's in the format:

ip:port:username:password

one per line in the proxies.txt file

 

the first proxy in the list is being used correctly, and when I view debugger I can see that on each loop the '%proxy data' is being rotated correctly.

Link to post
Share on other sites

After the navigate command, I added:

wait(1)

 

After doing this, it seems to be rotating the proxies as would be expected.

I confirmed this by changing the url to ipchicken.com; however when I changed the url to whatismyip.com it does not update with the new ip!

 

I even added code to make the browser load whatismyip.com and ipchicken.com sequentially on every loop; ipchicken.com would report the rotated proxy, while whatismyip.com always displays only the first proxy.

 

Evidently the proxies are in fact being rotated or else ipchicken.com wouldn't display the rotated proxy. However what baffles me is that whatismyip.com is still displaying the old ip, even after clearing cookies. If other sites exhibit similar behavior, that defeats the purpose of using proxies.

 

edit: I sent a copy of this to support, but even using the code below which opens a new thread/browser instance for each IP, whatismyip.com is still somehow reporting only the first IP used:

set(#i, 0, "Global")
ui stat monitor("iteration:", #i)
add list to list(%proxies, $list from file("C:\\Users\\Owner\\Desktop\\proxies.txt"), "Delete", "Global")
set list position(%proxies, 0)
loop($list total(%proxies)) {
   clear cookies
   increment(#i)
   set(#raw proxy data, $next list item(%proxies), "Global")
   clear list(%proxy data)
   add list to list(%proxy data, $list from text(#raw proxy data, ":"), "Delete", "Global")
   set(#thread running, $true, "Global")
   thread {
       in new browser {
           change proxy("{$list item(%proxy data, 0)}:{$list item(%proxy data, 1)}")
           if($comparison($list total(%proxy data), "=", 4)) {
               then {
                   set proxy credentials($list item(%proxy data, 2), $list item(%proxy data, 3))
               }
           }
           run javascript("location.reload(true);")
           wait(3)
           navigate("http://whatismyip.com", "Wait")
           wait(1)
           navigate("http://ipchicken.com", "Wait")
           wait(1)
       }
       set(#thread running, $false, "Global")
   }
   loop while($comparison(#thread running, "=", $true)) {
       wait(2)
   }
}

Link to post
Share on other sites

I've done everything that I can think of using UBot's built in commands and am unable to get around this problem. I added a feature to set a random user agent, clear cookies, wait 2 seconds, clear cookies again, disallow javascript/css/etc, open each instance in a new browser and close the page when I'm done, and yet somehow whatismyip is still able to track my connection.

 

For some reason after adding the allow javascript/css/etc, the compiled bot will now crash after an iteration or two.

 

set(#i, 0, "Global")
ui stat monitor("iteration:", #i)
ui stat monitor("ip:port : ", #ipport)
ui stat monitor("username:", #proxy username)
ui stat monitor("password:", #proxy password)
ui stat monitor("user agent: ", #useragent)
add list to list(%user agents, $list from file("C:\\Users\\Owner\\Desktop\\ua.txt"), "Delete", "Global")
add list to list(%proxies, $list from file("C:\\Users\\Owner\\Desktop\\proxies.txt"), "Delete", "Global")
set list position(%proxies, 0)
loop($list total(%proxies)) {
   clear cookies
   wait(2)
   clear cookies
   set(#useragent, $random list item(%user agents), "Global")
   increment(#i)
   set(#raw proxy data, $next list item(%proxies), "Global")
   clear list(%proxy data)
   add list to list(%proxy data, $list from text(#raw proxy data, ":"), "Delete", "Global")
   set(#thread running, $true, "Global")
   thread {
       in new browser {
           allow images("No")
           allow css("No")
           allow popups("No")
           allow javascript("No")
           allow flash("No")
           set(#ipport, "{$list item(%proxy data, 0)}:{$list item(%proxy data, 1)}", "Global")
           change proxy(#ipport)
           if($comparison($list total(%proxy data), "=", 4)) {
               then {
                   set(#proxy username, $list item(%proxy data, 2), "Global")
                   set(#proxy password, $list item(%proxy data, 3), "Global")
                   set proxy credentials(#proxy username, #proxy password)
               }
           }
           navigate("http://ipchicken.com", "Wait")
           wait(1)
           navigate("http://whatismyip.com", "Wait")
           wait(1)
           run javascript("location.reload(true);")
           wait(3)
           navigate("http://ibuildbots.com/test/test.php", "Wait")
           wait(1)
       }
       close page
       wait(1)
       set(#thread running, $false, "Global")
   }
   loop while($comparison(#thread running, "=", $true)) {
       wait(2)
   }
}

Link to post
Share on other sites

This issue is being looked at by Eddie. In this case IP auth is not an option, and he should be able to use the set proxy credentials without any problems. I'll be talking to him today to see if he has discovered anything regarding this.

 

 

John

Link to post
Share on other sites

ive always had problems with the change proxy command.

 

In my case the first proxy would be set right, the fallowing would crash.

 

To get around this, ive used the "in new browser" command.

 

Ive brought this up many times the past 2-3 months and there still does not seem to be a solution as it dosnt always fail but when it does its always the second change.

Link to post
Share on other sites

ive always had problems with the change proxy command.

 

In my case the first proxy would be set right, the fallowing would crash.

 

To get around this, ive used the "in new browser" command.

 

Ive brought this up many times the past 2-3 months and there still does not seem to be a solution as it dosnt always fail but when it does its always the second change.

 

This is the same behavior I am seeing as well. I wasn't aware of that specifically until I started testing yesterday for Wolfman, and that does seem to be the issue (even without the set proxy credentials command).

 

John

 

 

 

Link to post
Share on other sites
  • 1 month later...

Bump. Although there are a dozen proxy threads on the forum...

 

After all this time does it means it's not possible to be able to use proxies in a stable way?

 

Ubot gives us the ability to scale but in many cases scale is limited when you can't use proxies.

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