arunner26 51 Posted November 24, 2014 Report Share Posted November 24, 2014 I'm working on a program that really needs to use proxies.In the past I have not had much luck using them. Here is what I learned over the weekend that made this simple proxy checker work: 1. SET PROXY CREDENTIALS command in UBOT STUDIO version 4 does not work with the shared proxies from the company I am using. (it may work for other companies or fully private proxies) (My company allows me to enter APPROVED IPs instead of using USERNAME/PASSWORD and that is what I am doing) 2. Even if you just signed up with a proxy company and got your IPs they may not all work so you better check them. Here is the simple proxy checker I wrote and you are welcome to use. NOTE: Change the file input location before you use. INPUT FILE FORMAT: IP:PORT IP:PORT:USERNAME:PASSWORD (Note: My code loads username/password but does not use them) Enjoy! ui stat monitor("Proxy Being Checked:", "{#AccountsProxyIP}:{#AccountsProxyPort}")ui stat monitor("Proxy Status:", #ProxyStatusDisplay)set(#ProxyStatusDisplay, $nothing, "Global")clear list(%Accounts)clear list(%ProxyStatusResults)add list to list(%Accounts, $list from file("C:\\Users\\Andy\\Documents\\UBOT\\Application\\Accounts.txt"), "Delete", "Global")set(#AccountsIndex, 0, "Global")loop($list total(%Accounts)) { set(#AccountsItem, $list item(%Accounts, #AccountsIndex), "Global") clear list(%AccountsItems) add list to list(%AccountsItems, $list from text(#AccountsItem, ":"), "Delete", "Global") if($list total(%AccountsItems) > 0) { then { set(#ProxyStatus, $nothing, "Global") set(#AccountsProxyIP, $list item(%AccountsItems, 0), "Global") set(#AccountsProxyPort, $list item(%AccountsItems, 1), "Global") if($list total(%AccountsItems) >= 4) { then { set(#AccountsProxyUsername, $list item(%AccountsItems, 2), "Global") set(#AccountsPassword, $list item(%AccountsItems, 3), "Global") } else { } } clear cookies wait(1) change proxy("{#AccountsProxyIP}:{#AccountsProxyPort}") wait(1) navigate("http://www.google.com", "Wait") wait for browser event("Everything Loaded", "") wait(1) type text(<name="q">, "What is my ip?", "Standard") wait(1) click(<name="btnK">, "Left Click", "No") wait for browser event("Everything Loaded", "") wait(1) set(#ProxyResult, $nothing, "Global") set(#ProxyResult, $find regular expression($page scrape("What is my ip?", "Your public IP address"), #AccountsProxyIP), "Global") if(#ProxyResult = #AccountsProxyIP) { then { set(#ProxyStatus, "Good", "Global") } else { set(#ProxyStatus, "Bad", "Global") } } set(#ProxyStatusDisplay, "{#ProxyStatusDisplay}{#AccountsProxyIP}:{#ProxyStatus}{$new line}", "Global") add item to list(%ProxyStatusResults, #ProxyStatus, "Don\'t Delete", "Global") } else { } } set(#AccountsIndex, $add(#AccountsIndex, 1), "Global")}clear cookieswait(1)change proxy("None")navigate("http://www.google.com", "Wait")wait for browser event("Everything Loaded", "")wait(1)type text(<name="q">, "What is my ip?", "Standard")wait(1)click(<name="btnK">, "Left Click", "No")wait for browser event("Everything Loaded", "")wait(1)alert("Checking Complete...") 3 Quote Link to post Share on other sites
rkinks35 1 Posted January 14, 2015 Report Share Posted January 14, 2015 Trying this code out and its not working for some reason.. Maybe my file format is wrong, What file format are you using? Im just copying pasting free proxies off the web to test and get more comfortable with Proxy list... Learning process.. ugh Quote Link to post Share on other sites
arunner26 51 Posted January 14, 2015 Author Report Share Posted January 14, 2015 The format of the file I used for the sample is: NOTE: Change the file input location before you use. INPUT FILE FORMAT: IP:PORT IP:PORT:USERNAME:PASSWORD (Note: My code loads username/password but does not use them) The separator in the text file is colon. 1 Quote Link to post Share on other sites
pbsolution 4 Posted January 14, 2015 Report Share Posted January 14, 2015 Hello,i have tested with private Proxys in your format (IP:PORT:USERNAME:PASSWORD), but it dont work. What to change for Username and Password?Thanks Quote Link to post Share on other sites
arunner26 51 Posted January 14, 2015 Author Report Share Posted January 14, 2015 Hello,i have tested with private Proxys in your format (IP:PORT:USERNAME:PASSWORD), but it dont work. What to change for Username and Password?ThanksYou would need to make a change to add set proxy credentials command: change proxy("{#AccountsProxyIP}:{#AccountsProxyPort}") wait(1) set proxy credentials(#AccountsProxyUsername, #AccountsPassword) wait(1) Quote Link to post Share on other sites
rkinks35 1 Posted January 31, 2015 Report Share Posted January 31, 2015 The format of the file I used for the sample is: NOTE: Change the file input location before you use. INPUT FILE FORMAT: IP:PORT IP:PORT:USERNAME:PASSWORD (Note: My code loads username/password but does not use them) The separator in the text file is colon. I've got it to work for the first proxy, but anytime it tries to go ahead for the second proxy the website gives me an error: Something went wrong while displaying this webpage.Could not create a connection to the proxy server.PROXY_CONNECTION_FAILED: -130 Do you know what this means? How do I fix? Ive tried really simple proxy switching and checkers and it works fine for the first and then the rest on the list or table end up with this error. Quote Link to post Share on other sites
pbsolution 4 Posted January 31, 2015 Report Share Posted January 31, 2015 Hello arunner,can you please post the Code which i Need for Proxy with Login and Pass? This would help an Beginner !!I dont become it to run.Greetings from Germany Quote Link to post Share on other sites
arunner26 51 Posted January 31, 2015 Author Report Share Posted January 31, 2015 I've got it to work for the first proxy, but anytime it tries to go ahead for the second proxy the website gives me an error: Something went wrong while displaying this webpage.Could not create a connection to the proxy server.PROXY_CONNECTION_FAILED: -130 Do you know what this means? How do I fix? Ive tried really simple proxy switching and checkers and it works fine for the first and then the rest on the list or table end up with this error.Maybe your second proxy is no good. You can plug a proxy IP, port, username and password into a browse and try it to see if it is good.I often find that I have to go back to my proxy service and request a new proxy because the one they provided does not work. Hello arunner,can you please post the Code which i Need for Proxy with Login and Pass? This would help an Beginner !!I dont become it to run.Greetings from GermanyYou would need to make a change to add set proxy credentials command: change proxy("{#AccountsProxyIP}:{#AccountsProxyPort}") wait(1) set proxy credentials(#AccountsProxyUsername, #AccountsPassword) wait(1) 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.