Jump to content

WinHTTP - Get Used Proxy From Session Handle


Chance
 Share

Recommended Posts

#include<winhttp.au3>
$open = _WinHttpOpen(Default, $WINHTTP_ACCESS_TYPE_NAMED_PROXY, "123.123.123.123:8080")
$test = _WinHttpQueryOption($open, $WINHTTP_OPTION_PROXY)
If @error Then
    ConsoleWrite("!>Error: " & @error & @CR)
Else
    ConsoleWrite("+>Success: " & $test & @CR)
EndIf
ConsoleWrite(">Wroking: " & _WinHttpQueryOption($Open, $WINHTTP_OPTION_USER_AGENT) & @CR)
_WinHttpCloseHandle($open)

I'm having a little trouble understanding how to retrieve the used proxy from a session handle in winhttp.

From what I know, msdn says it deals with pointers, I don't think that the _WinHttpQueryOption() function is handling it right, I'm not entirely sure though...

Any ideas?

Basically, I just wana get the "123.123.123.123:8080" string by using the _WinHttpQueryOption() function, I can manage it using arrays but it would be more convinient using that function to reduce complexity. :(

Link to comment
Share on other sites

This can be a solution:

#include <WinHTTP.au3>
#include <WinAPI.au3>

Global Const $tagWINHTTP_PROXY_INFO = "DWORD dwAccessType;ptr lpszProxy;ptr lpszProxyBypass;"

$hOpen = _WinHttpOpen(Default, $WINHTTP_ACCESS_TYPE_NAMED_PROXY, "123.123.123.123:8080")

$tProxy = DllStructCreate($tagWINHTTP_PROXY_INFO)
DllCall($hWINHTTPDLL__WINHTTP, "bool", "WinHttpQueryOption", _
            "handle", $hOpen, _
            "dword", $WINHTTP_OPTION_PROXY, _
            "ptr", DllStructGetPtr($tProxy), _
            "dword*", DllStructGetSize($tProxy))

$ProxyName = GetWStrFromPointer(DllStructGetData($tProxy,"lpszProxy"))
ConsoleWrite($ProxyName & @CRLF)

_WinHttpCloseHandle($hOpen)

Func GetWStrFromPointer($pWStr)
    Local $iSize = _WinAPI_StringLenW($pWStr)
    Local $tWStr = DllStructCreate("wchar Data[" & $iSize & "]",$pWStr)
    Return DllStructGetData($tWStr,"Data")
EndFunc

When the words fail... music speaks.

Link to comment
Share on other sites

YES!

This is perfect, you're pritty well informed in these areas arent you? :)

Func _GetUSedProxy($session)
    Local Const $tagWINHTTP_PROXY_INFO = "DWORD dwAccessType;ptr lpszProxy;ptr lpszProxyBypass;"
    Local $tProxy = DllStructCreate($tagWINHTTP_PROXY_INFO)

    DllCall($hWINHTTPDLL__WINHTTP, "bool", "WinHttpQueryOption", _
            "handle", $session, _
            "dword", $WINHTTP_OPTION_PROXY, _
            "ptr", DllStructGetPtr($tProxy), _
            "dword*", DllStructGetSize($tProxy))

    Local $pWStr = DllStructGetData($tProxy,"lpszProxy")
    Local $aCall = DllCall("kernel32.dll", "int", "lstrlenW", "struct*", $pWStr)
    Local $iSize = $aCall[0]
    Local $tWStr = DllStructCreate("wchar Data[" & $iSize & "]",$pWStr)
    Return DllStructGetData($tWStr,"Data")
EndFunc

This solved my problem, thanks.

But as I had moved on in my little project, I discovered that what I'm trying to do with WinHTTP in AutoIt script might be impossible anyway...

The reason I wanted to grab proxy info from a session handle was because I was attempting to use WinHTTP with flag $WINHTTP_FLAG_ASYNC using no callback function because apparantly using the callback with multiple sessions causes a crash on certain machines.

So what I tried doing was not using the callback and managing multiple session through proxies with arrays.

It didn't work out as expected..

#AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6

#include ".incWinHttp.au3"

Opt("MustDeclareVars", 1)

;Info      : What this script will do is open to requests to a website that will shoow you your IP address, from my location.
;            - the majority of these proxies all work as of the date of this post.
;Problem   : Most of the time, the request headers are read correctly, but the responce HTML is rarely read ever...
;more info : If you use the proxy on another script without WINHTTP_FLAG_ASYNC paramater, all these proxies typically work and revieve the HTML and headers
;            - but for some reason in WINHTTP_FLAG_ASYNC mode, the HTML will rarely be recieved, while headers always come through with no problems.

Global $Proxies[10] = [ _
        "91.230.195.153:80", _
        "5.9.238.29:8080", _
        "190.183.221.226:8080", _
        "118.99.114.60:3128", _
        "186.116.6.34:8080", _
        "120.89.89.138:8080", _
        "118.99.71.218:3128", _
        "187.78.69.2:8080", _
        "112.120.80.212:3128", _
        "176.112.103.60:80" _
        ]



Global $RecievedData[10][3]

Global $Index, $Data, $Status

Global $hOpen[10][2]
Global $hConnect[10]
Global $hRequest[10]

If MsgBox(4, "Information!", "Press ""Yes"" to simultaniously open 10 HTTP sessions in Async mode....") <> 6 Then Exit

ConsoleWrite(@CR)
ConsoleWrite("->===============================================================================================================================" & @CR)

For $I = 0 To 9

    $hOpen[$I][0] = _WinHttpOpen("(Compatable; AutoItv3 Async Test)", $WINHTTP_ACCESS_TYPE_NAMED_PROXY, $Proxies[$I], Default, $WINHTTP_FLAG_ASYNC)
    $hOpen[$I][1] = True
    ;$hOpen[$I][2] = $Proxies[$I]

    _WinHttpSetTimeouts($hOpen[$I][0], 0, 3000, 3000, 3000)
    _WinHttpSetOption($hOpen[$I][0], $WINHTTP_OPTION_REDIRECT_POLICY, $WINHTTP_OPTION_REDIRECT_POLICY_ALWAYS); allow redirects

    ConsoleWrite("+>Opened Session " & ($I + 1) & " with " & $Proxies[$I])

    $hConnect[$I] = _WinHttpConnect($hOpen[$I][0], 'unrealx.lt', $INTERNET_DEFAULT_HTTP_PORT)
    If @error Then
        _WinHttpCloseHandle($hOpen[$I][0])
        ConsoleWrite(" Error: Closed Open Handle!" & $Proxies[$I] & @CR)
        ContinueLoop
    EndIf

    $hRequest[$I] = _WinHttpOpenRequest($hConnect[$I], Default, 'showip.php', Default, Default, Default)
    If Not $hRequest[$I] Then
        _WinHttpCloseHandle($hConnect[$I])
        _WinHttpCloseHandle($hOpen[$I][0])
        ConsoleWrite(" Error: Closed All Handles!" & $Proxies[$I] & @CR)
        ContinueLoop
    EndIf

    _WinHttpSendRequest($hRequest[$I])
    ConsoleWrite(@CR)
Next

ConsoleWrite("->===============================================================================================================================" & @CR )

For $I = 0 To 999999
    $Index = Mod($I, 10)
    If $hOpen[$Index][1] Then

        _WinHttpReceiveResponse($hRequest[$Index])
        $Status = _WinHttpQueryDataAvailableEx($hRequest[$Index])
        If @error = $ERROR_WINHTTP_INCORRECT_HANDLE_STATE Then
            _WinHttpCloseHandle($hRequest[$Index])
            _WinHttpCloseHandle($hConnect[$Index])
            _WinHttpCloseHandle($hOpen[$Index][0])

            $RecievedData[$Index][0] = "Error!"
            $RecievedData[$Index][1] = "Error!"
            $RecievedData[$Index][2] = _GetUSedProxy($hOpen[$Index][0]);$hOpen[$Index][2]

            $hOpen[$Index][1] = False
            $Data = 0
        ElseIf @error = -9001 Then
            MsgBox(0, "", "-9001")

        ElseIf $Status Then

            Do
                $Data &= _WinHttpReadData($hRequest[$Index], 0)
            Until @error

            $RecievedData[$Index][0] = StringRegExpReplace($Data, "r*n*", "")
            $RecievedData[$Index][1] = StringRegExpReplace(_WinHttpQueryHeaders($hRequest[$Index]), "(?:rn|)([^r]+)rn", "[$1] ")
            $RecievedData[$Index][2] = _GetUSedProxy($hOpen[$Index][0])

            _WinHttpCloseHandle($hRequest[$Index])
            _WinHttpCloseHandle($hConnect[$Index])
            _WinHttpCloseHandle($hOpen[$Index][0])

            $hOpen[$Index][1] = False
            $Data = ''

        Else
            If MsgBox(4, "Current Session: " & $Index, "Session not yet complete..." & @CR & "Check next?") <> 6 Then ExitLoop
        EndIf
    Else
        If MsgBox(4, "Cur Index: " & $Index, "This session was completed and processed..." & @CR & "Continue to next?") <> 6 Then ExitLoop
    EndIf
Next

If MsgBox(4, "Question...", "Display Results?") = 6 Then
    ConsoleWrite(@CR)
    For $I = 0 To 9
        ConsoleWrite(">" & ($I + 1) & "#=============================================================================================================================" & @CR)
        ConsoleWrite("+>Proxy     : " & $RecievedData[$I][2] & @CRLF)
        ConsoleWrite("+>Headers   : " & $RecievedData[$I][1] & @CRLF)
        ConsoleWrite("+>HTML      : " & $RecievedData[$I][0] & @CRLF)
        ConsoleWrite(">===============================================================================================================================" & @CR & @CR)
    Next
    ConsoleWrite(@CR)
EndIf

For $I = 0 To 9
    _WinHttpCloseHandle($hRequest[$I])
    _WinHttpCloseHandle($hConnect[$I])
    _WinHttpCloseHandle($hOpen[$I][0])
Next

Func _WinHttpQueryDataAvailableEx($hRequest); I need error code here
    Local $aCall = DllCall($hWINHTTPDLL__WINHTTP, "bool", "WinHttpQueryDataAvailable", "handle", $hRequest, "dword*", 0)
    If @error Then Return SetError(-9001, 0, 0)
    Local $aResult = DllCall("kernel32.dll", "dword", "GetLastError")
    Return SetError($aResult[0], $aCall[2], $aCall[0])
EndFunc   ;==>_WinHttpQueryDataAvailableEx

Func _GetUSedProxy($session)
    Local Const $tagWINHTTP_PROXY_INFO = "DWORD dwAccessType;ptr lpszProxy;ptr lpszProxyBypass;"
    Local $tProxy = DllStructCreate($tagWINHTTP_PROXY_INFO)

    DllCall($hWINHTTPDLL__WINHTTP, "bool", "WinHttpQueryOption", _
            "handle", $session, _
            "dword", $WINHTTP_OPTION_PROXY, _
            "ptr", DllStructGetPtr($tProxy), _
            "dword*", DllStructGetSize($tProxy))

    Local $pWStr = DllStructGetData($tProxy,"lpszProxy")
    Local $aCall = DllCall("kernel32.dll", "int", "lstrlenW", "struct*", $pWStr)
    Local $iSize = $aCall[0]
    Local $tWStr = DllStructCreate("wchar Data[" & $iSize & "]",$pWStr)
    Return DllStructGetData($tWStr,"Data")
EndFunc

here is an output displaying the randomness of the success.

->===============================================================================================================================
+>Opened Session 1 with 91.230.195.153:80
+>Opened Session 2 with 5.9.238.29:8080
+>Opened Session 3 with 190.183.221.226:8080
+>Opened Session 4 with 118.99.114.60:3128
+>Opened Session 5 with 186.116.6.34:8080
+>Opened Session 6 with 120.89.89.138:8080
+>Opened Session 7 with 118.99.71.218:3128
+>Opened Session 8 with 187.78.69.2:8080
+>Opened Session 9 with 112.120.80.212:3128
+>Opened Session 10 with 176.112.103.60:80
->===============================================================================================================================

>1#=============================================================================================================================
+>Proxy     : 0
+>Headers   : Error!
+>HTML      : Error!
>===============================================================================================================================

>2#=============================================================================================================================
+>Proxy     : 5.9.238.29:8080
+>Headers   : [HTTP/1.1 200 OK] [Date: Sat, 15 Dec 2012 20:39:10 GMT] [Content-Length: 14] [Content-Type: text/html; charset=utf-8] 

+>HTML      : IP: 5.9.238.29
>===============================================================================================================================

>3#=============================================================================================================================
+>Proxy     : 190.183.221.226:8080
+>Headers   : [HTTP/1.1 200 OK] [Date: Sat, 15 Dec 2012 20:39:08 GMT] [Content-Length: 19] [Content-Type: text/html; charset=utf-8] 

+>HTML      : IP: 190.183.221.226
>===============================================================================================================================

>4#=============================================================================================================================
+>Proxy     : 118.99.114.60:3128
+>Headers   : [HTTP/1.1 200 OK] [Date: Sat, 15 Dec 2012 20:39:08 GMT] [Content-Length: 17] [Content-Type: text/html; charset=utf-8] 

+>HTML      : IP: 118.99.114.60
>===============================================================================================================================

>5#=============================================================================================================================
+>Proxy     : 186.116.6.34:8080 <- this one should have worked because I've manually tested it multiple times, but it recieved nothing...
+>Headers   : 
+>HTML      : 0
>===============================================================================================================================

>6#=============================================================================================================================
+>Proxy     : 120.89.89.138:8080
+>Headers   : [HTTP/1.1 200 OK] [Date: Sat, 15 Dec 2012 20:39:12 GMT] [Content-Length: 17] [Content-Type: text/html; charset=utf-8] 

+>HTML      : IP: 120.89.89.138
>===============================================================================================================================

>7#=============================================================================================================================
+>Proxy     : 118.99.71.218:3128 <- this one should have worked because I've manually tested it multiple times, but it recieved nothing...
+>Headers   : 
+>HTML      : 
>===============================================================================================================================

>8#=============================================================================================================================
+>Proxy     : 187.78.69.2:8080 <- this one should have worked because I've manually tested it multiple times, but it recieved nothing...
+>Headers   : 
+>HTML      : 
>===============================================================================================================================

>9#=============================================================================================================================
+>Proxy     : 112.120.80.212:3128
+>Headers   : [HTTP/1.0 200 OK] [Date: Sat, 15 Dec 2012 20:39:17 GMT] [Content-Length: 18] [Content-Type: text/html; charset=utf-8] [X-Cache: MISS from prop] [X-Cache-Lookup: MISS from prop:3128] [Via: 1.0 shadow (squid/3.1.19)] [Connection: keep-alive] 

+>HTML      : IP: 112.120.80.212
>===============================================================================================================================

>10#=============================================================================================================================
+>Proxy     : 176.112.103.60:80
+>Headers   : [HTTP/1.1 200 OK] [Date: Sat, 15 Dec 2012 20:39:07 GMT] [Content-Length: 18] [Content-Type: text/html; charset=utf-8] 

+>HTML      : IP: 176.112.103.60
>===============================================================================================================================

It seems that there's a bug in AutoIt that causes the _WinHttpReadData() function to only work at random :/

Link to comment
Share on other sites

No, Its the same with or without proxies, and I think I know why now.

lpdwNumberOfBytesRead

Pointer to an unsigned long integer variable that receives the number of bytes read.WinHttpReadData sets this value to zero before doing any work or error checking. When using WinHTTP asynchronously, always set this parameter to NULL and retrieve the information in the callback function; not doing so can cause a memory fault.

Obviously, I think, It's saying that if using winhttp asynchronously, YOU MUST use a callback function to seccessfully read the responce.

I'm not sure what exactly is happening but I'm going to assume that might be the couse of the random read failure.

And using a callback function is out of the question because opening more than 2 or 3 sessions will cause autoit to crash as explained in the help file.

My goal was to make 7-10 requests at the same time to multiple sites but I guess it's not possible in this language.

Edited by FlutterShy
Link to comment
Share on other sites

I don't know if it's anything wrong, these hosts sometimes fails, sometimes works, even using objects.

For example this code sometimes work but not all time:

Global Const $HTTPREQUEST_PROXYSETTING_PROXY = 0x02

$oHTTP = ObjCreate('WinHTTP.WinHTTPRequest.5.1')
With $oHTTP
    .Open('GET','http://unrealx.lt/showip.php',True)
    .SetProxy($HTTPREQUEST_PROXYSETTING_PROXY,"91.230.195.153:80","reverse-91-230-195-153.icnhost.net")
    .Send()
EndWith
MsgBox(0,"",$oHTTP.ResponseText())
Edited by Andreik

When the words fail... music speaks.

Link to comment
Share on other sites

You're right, I think there might be hope after all.

I just tried without using proxies, and all the calls worked correclty.

#AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6

#include ".incWinHttp.au3"

Opt("MustDeclareVars", 1)

;Info : What this script will do is open to requests to a website that will shoow you your IP address, from my location.
; - the majority of these proxies all work as of the date of this post.
;Problem : Most of the time, the request headers are read correctly, but the responce HTML is rarely read ever...
;more info : If you use the proxy on another script without WINHTTP_FLAG_ASYNC paramater, all these proxies typically work and revieve the HTML and headers
; - but for some reason in WINHTTP_FLAG_ASYNC mode, the HTML will rarely be recieved, while headers always come through with no problems.

Global $Proxies[10] = [ _
"91.230.195.153:80", _
"5.9.238.29:8080", _
"190.183.221.226:8080", _
"118.99.114.60:3128", _
"186.116.6.34:8080", _
"120.89.89.138:8080", _
"118.99.71.218:3128", _
"187.78.69.2:8080", _
"112.120.80.212:3128", _
"176.112.103.60:80" _
]



Global $RecievedData[10][3]

Global $Index, $Data, $Status

Global $hOpen[10][2]
Global $hConnect[10]
Global $hRequest[10]

If MsgBox(4, "Information!", "Press ""Yes"" to simultaniously open 10 HTTP sessions in Async mode....") <> 6 Then Exit

ConsoleWrite(@CR)
ConsoleWrite("->===============================================================================================================================" & @CR)

For $I = 0 To 9

$hOpen[$I][0] = _WinHttpOpen("(Compatable; AutoItv3 Async Test)", Default, Default, Default, $WINHTTP_FLAG_ASYNC)
$hOpen[$I][1] = True
;$hOpen[$I][2] = $Proxies[$I]

_WinHttpSetTimeouts($hOpen[$I][0], 0, 3000, 3000, 3000)
_WinHttpSetOption($hOpen[$I][0], $WINHTTP_OPTION_REDIRECT_POLICY, $WINHTTP_OPTION_REDIRECT_POLICY_ALWAYS); allow redirects

ConsoleWrite("+>Opened Session " & ($I + 1) & " with " & $Proxies[$I])

$hConnect[$I] = _WinHttpConnect($hOpen[$I][0], 'unrealx.lt', $INTERNET_DEFAULT_HTTP_PORT)
If @error Then
_WinHttpCloseHandle($hOpen[$I][0])
ConsoleWrite(" Error: Closed Open Handle!" & $Proxies[$I] & @CR)
ContinueLoop
EndIf

$hRequest[$I] = _WinHttpOpenRequest($hConnect[$I], Default, 'showip.php', Default, Default, Default)
If Not $hRequest[$I] Then
_WinHttpCloseHandle($hConnect[$I])
_WinHttpCloseHandle($hOpen[$I][0])
ConsoleWrite(" Error: Closed All Handles!" & $Proxies[$I] & @CR)
ContinueLoop
EndIf

_WinHttpSendRequest($hRequest[$I])
ConsoleWrite(@CR)
Next

ConsoleWrite("->===============================================================================================================================" & @CR )

For $I = 0 To 999999
$Index = Mod($I, 10)
If $hOpen[$Index][1] Then

_WinHttpReceiveResponse($hRequest[$Index])
$Status = _WinHttpQueryDataAvailableEx($hRequest[$Index])
If @error = $ERROR_WINHTTP_INCORRECT_HANDLE_STATE Then
_WinHttpCloseHandle($hRequest[$Index])
_WinHttpCloseHandle($hConnect[$Index])
_WinHttpCloseHandle($hOpen[$Index][0])

$RecievedData[$Index][0] = "Error!"
$RecievedData[$Index][1] = "Error!"
$RecievedData[$Index][2] = _GetUSedProxy($hOpen[$Index][0]);$hOpen[$Index][2]

$hOpen[$Index][1] = False
$Data = 0
ElseIf @error = -9001 Then
MsgBox(0, "", "-9001")

ElseIf $Status Then

Do
$Data &= _WinHttpReadData($hRequest[$Index], 0)
Until @error
Do
$Data &= _WinHttpReadData($hRequest[$Index], 0)
Until @error
Do
$Data &= _WinHttpReadData($hRequest[$Index], 0)
Until @error

$RecievedData[$Index][0] = StringRegExpReplace($Data, "r*n*", "")
$RecievedData[$Index][1] = StringRegExpReplace(_WinHttpQueryHeaders($hRequest[$Index]), "(?:rn|)([^r]+)rn", "[$1] ")
$RecievedData[$Index][2] = '';_GetUSedProxy($hOpen[$Index][0])

_WinHttpCloseHandle($hRequest[$Index])
_WinHttpCloseHandle($hConnect[$Index])
_WinHttpCloseHandle($hOpen[$Index][0])

$hOpen[$Index][1] = False
$Data = ''

Else
If MsgBox(4, "Current Session: " & $Index, "Session not yet complete..." & @CR & "Check next?") <> 6 Then ExitLoop
EndIf
Else
If MsgBox(4, "Cur Index: " & $Index, "This session was completed and processed..." & @CR & "Continue to next?") <> 6 Then ExitLoop
EndIf
Next

If MsgBox(4, "Question...", "Display Results?") = 6 Then
ConsoleWrite(@CR)
For $I = 0 To 9
ConsoleWrite(">" & ($I + 1) & "#=============================================================================================================================" & @CR)
ConsoleWrite("+>Proxy : " & $RecievedData[$I][2] & @CRLF)
ConsoleWrite("+>Headers : " & $RecievedData[$I][1] & @CRLF)
ConsoleWrite("+>HTML : " & $RecievedData[$I][0] & @CRLF)
ConsoleWrite(">===============================================================================================================================" & @CR & @CR)
Next
ConsoleWrite(@CR)
EndIf

For $I = 0 To 9
_WinHttpCloseHandle($hRequest[$I])
_WinHttpCloseHandle($hConnect[$I])
_WinHttpCloseHandle($hOpen[$I][0])
Next

Func _WinHttpQueryDataAvailableEx($hRequest); I need error code here
Local $aCall = DllCall($hWINHTTPDLL__WINHTTP, "bool", "WinHttpQueryDataAvailable", "handle", $hRequest, "dword*", 0)
If @error Then Return SetError(-9001, 0, 0)
Local $aResult = DllCall("kernel32.dll", "dword", "GetLastError")
Return SetError($aResult[0], $aCall[2], $aCall[0])
EndFunc ;==>_WinHttpQueryDataAvailableEx

Func _GetUSedProxy($session)
Local Const $tagWINHTTP_PROXY_INFO = "DWORD dwAccessType;ptr lpszProxy;ptr lpszProxyBypass;"
Local $tProxy = DllStructCreate($tagWINHTTP_PROXY_INFO)

DllCall($hWINHTTPDLL__WINHTTP, "bool", "WinHttpQueryOption", _
"handle", $session, _
"dword", $WINHTTP_OPTION_PROXY, _
"ptr", DllStructGetPtr($tProxy), _
"dword*", DllStructGetSize($tProxy))

Local $pWStr = DllStructGetData($tProxy,"lpszProxy")
Local $aCall = DllCall("kernel32.dll", "int", "lstrlenW", "struct*", $pWStr)
Local $iSize = $aCall[0]
Local $tWStr = DllStructCreate("wchar Data[" & $iSize & "]",$pWStr)
Return DllStructGetData($tWStr,"Data")
EndFunc

>1#=============================================================================================================================
+>Proxy :
+>Headers : [HTTP/1.1 200 OK] [Date: Sat, 15 Dec 2012 22:40:51 GMT] [Content-Length: 17] [Connection: close] [Content-Type: text/html; charset=utf-8]

+>HTML : IP: 70.115.160.78
>===============================================================================================================================

>2#=============================================================================================================================
+>Proxy :
+>Headers : [HTTP/1.1 200 OK] [Date: Sat, 15 Dec 2012 22:40:50 GMT] [Content-Length: 17] [Connection: close] [Content-Type: text/html; charset=utf-8]

+>HTML : IP: 70.115.160.78
>===============================================================================================================================

>3#=============================================================================================================================
+>Proxy :
+>Headers : [HTTP/1.1 200 OK] [Date: Sat, 15 Dec 2012 22:40:50 GMT] [Content-Length: 17] [Connection: close] [Content-Type: text/html; charset=utf-8]

+>HTML : IP: 70.115.160.78
>===============================================================================================================================

>4#=============================================================================================================================
+>Proxy :
+>Headers : [HTTP/1.1 200 OK] [Date: Sat, 15 Dec 2012 22:40:50 GMT] [Content-Length: 17] [Connection: close] [Content-Type: text/html; charset=utf-8]

+>HTML : IP: 70.115.160.78
>===============================================================================================================================

>5#=============================================================================================================================
+>Proxy :
+>Headers : [HTTP/1.1 200 OK] [Date: Sat, 15 Dec 2012 22:40:50 GMT] [Content-Length: 17] [Connection: close] [Content-Type: text/html; charset=utf-8]

+>HTML : IP: 70.115.160.78
>===============================================================================================================================

>6#=============================================================================================================================
+>Proxy :
+>Headers : [HTTP/1.1 200 OK] [Date: Sat, 15 Dec 2012 22:40:50 GMT] [Content-Length: 17] [Connection: close] [Content-Type: text/html; charset=utf-8]

+>HTML : IP: 70.115.160.78
>===============================================================================================================================

>7#=============================================================================================================================
+>Proxy :
+>Headers : [HTTP/1.1 200 OK] [Date: Sat, 15 Dec 2012 22:40:50 GMT] [Content-Length: 17] [Connection: close] [Content-Type: text/html; charset=utf-8]

+>HTML : IP: 70.115.160.78
>===============================================================================================================================

>8#=============================================================================================================================
+>Proxy :
+>Headers : [HTTP/1.1 200 OK] [Date: Sat, 15 Dec 2012 22:40:50 GMT] [Content-Length: 17] [Connection: close] [Content-Type: text/html; charset=utf-8]

+>HTML : IP: 70.115.160.78
>===============================================================================================================================

>9#=============================================================================================================================
+>Proxy :
+>Headers : [HTTP/1.1 200 OK] [Date: Sat, 15 Dec 2012 22:40:50 GMT] [Content-Length: 17] [Connection: close] [Content-Type: text/html; charset=utf-8]

+>HTML : IP: 70.115.160.78
>===============================================================================================================================

>10#=============================================================================================================================
+>Proxy :
+>Headers : [HTTP/1.1 200 OK] [Date: Sat, 15 Dec 2012 22:40:50 GMT] [Content-Length: 17] [Connection: close] [Content-Type: text/html; charset=utf-8]

+>HTML : IP: 70.115.160.78
>===============================================================================================================================

Every single session worked when not through a proxy..

So I guess there's something else going wrong with this.

But the weird thing with this is this~

All the proxies I'm getting are through a script that tests them using multiple processes (multi-processing) which is just horrible on the CPU.

But for some reason, it's way more successful when testing them than using one autoit script process, when I use multiprocessing, the success rate is way more effective, but through one process using asyn mode, the sucsess rate is very very low.

I'l have to figure out what's wrong hopefully.


Another thing to mention: the success rate is pretty good when using async mode with proxies but ONLY if calls are made one at a time. where testing 7-10 of them at the same using multiprocessing time will work with an equal sucsess rate aswell.

Something's wrong...

Edited by FlutterShy
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...