Jump to content

Trying to route address through web proxy


Sodori
 Share

Recommended Posts

Hi all!

Straight to code:

#include <IE.au3>
#include <Array.au3>
#include <Excel.au3>
#include <File.au3>
#include <Misc.au3>
#include <MsgBoxConstants.au3>
#include <GuiListBox.au3>

;~ _Method1()
_Method2()

Func _Method1()

   Local $countries[3] = ["nl", "us", "de"]
   Local $oIE = _IECreate("https://proxy-" & $countries[Random(0, 2)] & ".hide.me/")

   Local $pURL = _IEGetObjByName($oIE, "u")
   Local $pForm = _IEFormGetCollection($oIE, "form")

   _IEPropertySet($pURL, "innertext", "http://whatismyipaddress.com/")
   _IEFormSubmit($pForm)
   _IELoadWait($oIE)

EndFunc

Func _Method2()

   Local $oIE = _IECreate("https://hide.me/en/proxy")

   Local $pURL = _IEGetObjByName($oIE, "u")
   Local $pButton = _IEGetObjById($oIE, "hide_register_save")

   _IEPropertySet($pURL, "innertext", "http://whatismyipaddress.com/")
   _IEAction($pButton, "click")

EndFunc

Once upon a time, _Method1() did work! Now it's not... anyone knows why? Also, is there a fix for method 2? It do wrights, and I believe even pushes the button. However Autoit kinda only edits the greyed out part of it, so the page doesn't really see it as a input. Also, do someone knows an really easy method of doing the random country thing from Method1 over on Method2? Maybe even a way to set the options?? :o

Thanks for your time, and your answer!

Edited by Sodori
Link to comment
Share on other sites

I know this isn't what you are looking for but I got the second one to work with this:

Func _Method2()

   Local $oIE = _IECreate("https://hide.me/en/proxy")

   Local $pURL = _IEGetObjByName($oIE, "u")
   Local $pButton = _IEGetObjById($oIE, "hide_register_save")

   _IEPropertySet($pURL, "innertext", "http://whatismyipaddress.com/")

   Sleep(5000)
    For $i = 1 TO 19
        Send("{TAB}")
        Sleep(100)
    Next
    Send("http://whatismyipaddress.com/{ENTER}")

EndFunc

Even WinWait doesn't work on that page. The developers must not like automation.

The first one works for me. I get a new proxy for the ie session.

Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

Link to comment
Share on other sites

I have asked them for a url link instead, so you can open a web site with proxy directly and avoid all that.

Your method would work with a bit of tweaking to the numbers in the $i loop, it's not optimal though to have such.. Neither is method one much more reliable since it works for me too now. Bit of weekend seemly helped. Post weekend, as I ran Method1, upon submitting, it would pretty much just refresh the page blanking out the input box. So yeah. Anyone wouldn't perchance know a better proxy site with similar functions? That or perhaps someone do find an optimal solution to my issues. Big thanks for the great idea and effort btw ComputerGroove!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...