Sign in to follow this  
Followers 0
Cherokee

Proxy configuration _WinHttp

3 posts in this topic

I'm trying to set a proxy in _WinHttp

Here's my code

$hOpen = _WinHttpOpen($userAgent)
   $hConnect = _WinHttpConnect($hOpen, $host, $SSL)


   _WinHttpSetDefaultProxyConfiguration(1, "84.40.120.192:8080")


   $hLoginResult = _WinHttpSimpleFormFill($hConnect, $referer, $actionUrl, _
           $formID, _
           "name:" & $inputUser, $user, _
           "name:" & $inputPass, $pass)

   ConsoleWrite($hLoginResult & @CRLF)

   _WinHttpCloseHandle($hConnect)
   _WinHttpCloseHandle($hOpen)

But it's just using my regular IP. I'm not too familiar with using proxies inside _WinHttp so any help is appreciated.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

;...
$hOpen = _WinHttpOpen($userAgent, $WINHTTP_ACCESS_TYPE_NAMED_PROXY, "84.40.120.192:8080")
;...
 

 

$hOpen = _WinHttpOpen($userAgent, $WINHTTP_ACCESS_TYPE_NAMED_PROXY, "84.40.120.192:8080")
$hConnect = _WinHttpConnect($hOpen, $host, $SSL)
$hLoginResult = _WinHttpSimpleFormFill($hConnect, $referer, $actionUrl, _
        $formID, _
        "name:" & $inputUser, $user, _
        "name:" & $inputPass, $pass)
ConsoleWrite($hLoginResult & @CRLF)
_WinHttpCloseHandle($hConnect)
_WinHttpCloseHandle($hOpen)
Edited by trancexx

♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

;...
$hOpen = _WinHttpOpen($userAgent, $WINHTTP_ACCESS_TYPE_NAMED_PROXY, "84.40.120.192:8080")
;...
 

 

$hOpen = _WinHttpOpen($userAgent, $WINHTTP_ACCESS_TYPE_NAMED_PROXY, "84.40.120.192:8080")
$hConnect = _WinHttpConnect($hOpen, $host, $SSL)
$hLoginResult = _WinHttpSimpleFormFill($hConnect, $referer, $actionUrl, _
        $formID, _
        "name:" & $inputUser, $user, _
        "name:" & $inputPass, $pass)
ConsoleWrite($hLoginResult & @CRLF)
_WinHttpCloseHandle($hConnect)
_WinHttpCloseHandle($hOpen)

Thanks that works perfectly :)

Edited by Cherokee

Share this post


Link to post
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
Sign in to follow this  
Followers 0