Sign in to follow this  
Followers 0
Armand

Surf Through Proxy!

12 posts in this topic

well... i've looked all over the forum just realize that there is no clean example on how do one uses AU3 through proxies with TCPConnect/Send/Recv, the only quite through solution given was by: "lod3n" at: #420962

however i don't want to use "WinHttp.WinHttpRequest.5.1".

after looking at "ptrex" post : #434916

and "weaponx" at: #417124

i've made this Quick and EZ to check script which everyone can just RUN and try to solve this Proxy thing!

TCPStartup() ;Start the TCP.
$string = "201.63.42.31:6588|203.76.176.88:6588|213.184.163.134:3128|218.252.124.128:8080|222.166.90.51:8080|222.167.74.251:8080|58.185.16.214:80" & _
        "|61.10.153.91:8080|82.116.133.114:8000|210.34.14.186:808|61.1.190.25:8080|219.240.36.175:4480|190.79.153.71:6588|218.246.118.22:3128" & _
        "|218.7.13.186:80|189.29.115.6:6588|190.67.17.102:6588|124.125.169.229:6588|123.236.99.1:6588|190.210.5.163:8080|196.12.137.49:6588" & _
        "|200.171.139.199:6588|200.217.5.90:6588|201.18.51.75:6588|201.27.55.106:6588|201.41.64.145:6588|201.59.239.10:6588|202.158.230.247:8080|201.94.182.46:6588" & _
        "|203.194.97.168:6588|210.158.6.201:8080|210.20.177.145:8080|210.20.103.214:8080|211.120.201.161:8080|212.46.17.246:6588" & _
        "|218.140.110.154:8080|218.226.186.98:8080|218.229.32.248:8080|219.175.12.60:8080|219.38.18.48:8080|220.11.32.161:8080"

$stringS = "213.184.163.134:3128" ; Just put one IP:PORT pair in here and move the 'S' up if u want to check a specific one!

$Array = StringSplit($string, "|")
If $Array[0] = 0 Then
    ; Can't happen since we're manualy checking :)
    ConsoleWrite("***ERROR: You dumb-ass you forgot to put-in a proxy! ***"&@CRLF)
EndIf

For $i = 1 To $Array[0] ; Just run through the proxies and try to analyze the the sends...
    $temp = StringSplit($Array[$i], ":")
    $ipAddress = $temp[1]
    $port = $temp[2]

    $tcprun = TCPConnect($ipAddress, $port); Connects the proxy. [no need in user/pass since these are public]
    Switch @error
        Case 1
            ConsoleWrite("***ERROR: Ip address is incorrect ***"&@CRLF)
        Case 2
            ConsoleWrite("***ERROR: Port is incorrect ***"&@CRLF)
    EndSwitch

    If $tcprun = -1 Then
        ConsoleWrite($Array[$i] & " is found to be --> Disconnected"&@CRLF)
    Else
        ConsoleWrite($Array[$i] & " is found to be --> Connected"&@CRLF)
    EndIf
    
    $cmd = 'CONNECT 64.111.104.70:443 HTTP/1.1' & @CRLF ; 64.111.104.70 = autoitscript.com
    $cmd &= 'GET / HTTP/1.1'& @CRLF
    $cmd &= 'Host: www.autoitscript.com'& @CRLF
    $cmd &= "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)" & @CRLF
    $cmd &= "Connection: close" & @CRLF
    $cmd &= "" & @CRLF ; Added one empty line as it specifies in the RFC.
    
    TCPSend($tcprun, $cmd)
    While 1
        Sleep(100)
        $srcv = TCPRecv($tcprun, 2048)
        If @error <> 0 Then ; If TCPRecv @error <> 0 but @error = WinAPI error!
            ConsoleWrite("***ERROR: WINAPI: #"&@error&" ***"&@CRLF)
            ExitLoop
        EndIf
        If ($srcv <> "") Then
            ConsoleWrite("Server Reply: "&@CRLF&$srcv&@CRLF)
        EndIf
    WEnd
Next
TCPShutdown()

beside that, i've found this article about proxies quite deep: http://tools.ietf.org/id/draft-luotonen-we...unneling-01.txt

but then i've realize i keep getting WIN-API error: 10054, so i've looked it up and found a site with all of the WIN-API errors:

http://www.sockets.com/err_lst1.htm#WSAECONNRESET

so now i'm leaving it in here untill i'll finish watching a movie relaxing myself before continueing my examination of PROXIES.

ANY HELP WILL BE APPRECIATED!!!_______________THANKS IN ADVANCE !!!


[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

Share this post


Link to post
Share on other sites



@Bert

well... thanks for the suggestion, i've checked my timeout and it was on default... i guess it was silly yeah...

so i've set it:

Opt("TCPTimeout",10000)

and it seems like i am now able to get replies from the server :)

HORRAY!

Now let's see what lays ahead :P

P.S- meanwhile i ran into that: http://www.autoitscript.com/forum/index.ph...l=proxy+connect

i can't quite realy why to butter with socks... what's the different between sock/norm connection ?!


[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

Share this post


Link to post
Share on other sites

Well... No one?!

seems like it's sometimes ok and sometimes it fails so i've even put a hight tcptimeout... but yet no changes...

also i still haven't figured the difference between normal proxies to SOCK proxies and how to use these...

-> surely couse i'm still stuck on normal proxies :)


[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

Share this post


Link to post
Share on other sites

well.. current script [new proxies...]

Opt("TCPTimeout", 30000)
TCPStartup() ;Start the TCP.
$string = "" & _
        "221.89.75.33:8080|221.88.8.117:80|58.89.185.46:8000|66.84.97.67:7212|67.162.170.185:8080|84.101.224.98:3128|85.21.246.228:8080" & _
        "|89.175.24.173:3128|200.88.114.166:80|210.42.140.5:3128|63.147.134.5:80|89.29.200.182:8080|201.211.82.33:8080|201.245.170.53:6588" & _
        "|189.19.58.67:80|200.179.99.73:6588|203.197.115.76:6588|202.70.195.22:6588|201.17.163.70:6588|210.75.12.100:8080|85.138.197.172:3128" & _
        "|75.68.4.132:8080|189.7.69.235:6588|221.13.32.6:1938|83.14.223.198:6588|201.252.7.43:3128|200.93.63.19:8080" & _
        "|129.41.240.66:8088|219.140.197.227:8692|201.80.56.18:6588|201.75.158.171:6588|201.82.245.215:6588|201.80.139.160:6588" & _
        "|202.131.244.26:80|213.56.81.158:80|218.181.104.45:8080|63.199.3.121:8080|86.6.5.162:7212|203.211.140.156:80|85.236.151.26:8080"

$stringS = "" ; Just put one IP:PORT pair in here and move the 'S' up if u want to check a specific one!

$Array = StringSplit($string, "|")
If $Array[0] = 0 Then
    ; Can't happen since we're manualy checking :)
    ConsoleWrite("***ERROR: You dumb-ass you forgot to put-in a proxy! ***" & @CRLF)
    ConsoleWrite("___________________________________________________________"& @CRLF& @CRLF)
    Exit
EndIf

For $i = 1 To $Array[0] ; Just run through the proxies and try to analyze the the sends...
    $temp = StringSplit($Array[$i], ":")
    $ipAddress = $temp[1]
    $port = $temp[2]

    $tcprun = TCPConnect($ipAddress, $port); Connects the proxy. [no need in user/pass since these are public]
    Switch @error
        Case 1
            ConsoleWrite("***ERROR: Ip address is incorrect ***" & @CRLF)
            ConsoleWrite("___________________________________________________________"& @CRLF& @CRLF)
            ContinueLoop
        Case 2
            ConsoleWrite("***ERROR: Port is incorrect ***" & @CRLF)
            ConsoleWrite("___________________________________________________________"& @CRLF& @CRLF)
            ContinueLoop
    EndSwitch

    If $tcprun = -1 Then
        ConsoleWrite($Array[$i] & " is found to be --> Disconnected" & @CRLF)
        ContinueLoop
    Else
        ConsoleWrite($Array[$i] & " is found to be --> Connected" & @CRLF)
    EndIf
    
    $cmd = 'CONNECT '&$ipAddress&":"&$port&' HTTP/1.1' & @CRLF ; 64.111.104.70 = autoitscript.com
    $cmd &= 'GET / HTTP/1.1' & @CRLF
    $cmd &= 'Host: www.autoitscript.com' & @CRLF
    $cmd &= "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)" & @CRLF
    $cmd &= "Connection: close" & @CRLF
    $cmd &= "" & @CRLF ; Added one empty line as it specifies in the RFC.
    ConsoleWrite("[Sending: #1" & @CRLF & $cmd & "/Sending]" & @CRLF)
    TCPSendRecv($tcprun, $cmd)
    
    $cmd = 'GET / HTTP/1.1' & @CRLF
    $cmd &= 'Host: www.autoitscript.com' & @CRLF
    $cmd &= "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)" & @CRLF
    $cmd &= "Connection: close" & @CRLF
    $cmd &= "" & @CRLF ; Added one empty line as it specifies in the RFC.
    ConsoleWrite("[Sending: #2" & @CRLF & $cmd & "/Sending]" & @CRLF)
    TCPSendRecv($tcprun, $cmd)
Next
TCPShutdown()

Func TCPSendRecv($tcprun, $cmd)
    Local $ret = TCPSend($tcprun, $cmd)
    If $ret = 0 Then ; If TCPRecv @error <> 0 but @error = WinAPI error!
        ConsoleWrite("***ERROR: send WINAPI: #" & @error & " ***" & @CRLF)
        ConsoleWrite("___________________________________________________________"& @CRLF& @CRLF)
        Return
    EndIf
    
    $manualTimeOut = TimerInit();7200
    While 1
        Sleep(100)
        $srcv = TCPRecv($tcprun, 2048)
        If @error <> 0 Then ; If TCPRecv @error <> 0 but @error = WinAPI error!
            ConsoleWrite("***ERROR: recv WINAPI: #" & @error & " ***" & @CRLF)
            ConsoleWrite("___________________________________________________________"& @CRLF& @CRLF)
            ExitLoop
        EndIf
        If ($srcv <> "") Then
            ConsoleWrite("Server Reply: " & @CRLF & $srcv & @CRLF)
        EndIf
        
        If TimerDiff($manualTimeOut) >= 7200 Then
            ConsoleWrite("***ERROR: Manual Time-Limit exceeded! ***" & @CRLF)
            ConsoleWrite("___________________________________________________________"& @CRLF& @CRLF)
            ExitLoop
        EndIf
    WEnd
EndFunc   ;==>TCPSendRecvOpt("TCPTimeout", 30000)
TCPStartup() ;Start the TCP.
$string = "" & _
        "221.89.75.33:8080|221.88.8.117:80|58.89.185.46:8000|66.84.97.67:7212|67.162.170.185:8080|84.101.224.98:3128|85.21.246.228:8080" & _
        "|89.175.24.173:3128|200.88.114.166:80|210.42.140.5:3128|63.147.134.5:80|89.29.200.182:8080|201.211.82.33:8080|201.245.170.53:6588" & _
        "|189.19.58.67:80|200.179.99.73:6588|203.197.115.76:6588|202.70.195.22:6588|201.17.163.70:6588|210.75.12.100:8080|85.138.197.172:3128" & _
        "|75.68.4.132:8080|189.7.69.235:6588|221.13.32.6:1938|83.14.223.198:6588|201.252.7.43:3128|200.93.63.19:8080" & _
        "|129.41.240.66:8088|219.140.197.227:8692|201.80.56.18:6588|201.75.158.171:6588|201.82.245.215:6588|201.80.139.160:6588" & _
        "|202.131.244.26:80|213.56.81.158:80|218.181.104.45:8080|63.199.3.121:8080|86.6.5.162:7212|203.211.140.156:80|85.236.151.26:8080"

$stringS = "" ; Just put one IP:PORT pair in here and move the 'S' up if u want to check a specific one!

$Array = StringSplit($string, "|")
If $Array[0] = 0 Then
    ; Can't happen since we're manualy checking :)
    ConsoleWrite("***ERROR: You dumb-ass you forgot to put-in a proxy! ***" & @CRLF)
    ConsoleWrite("___________________________________________________________"& @CRLF& @CRLF)
    Exit
EndIf

For $i = 1 To $Array[0] ; Just run through the proxies and try to analyze the the sends...
    $temp = StringSplit($Array[$i], ":")
    $ipAddress = $temp[1]
    $port = $temp[2]

    $tcprun = TCPConnect($ipAddress, $port); Connects the proxy. [no need in user/pass since these are public]
    Switch @error
        Case 1
            ConsoleWrite("***ERROR: Ip address is incorrect ***" & @CRLF)
            ConsoleWrite("___________________________________________________________"& @CRLF& @CRLF)
            ContinueLoop
        Case 2
            ConsoleWrite("***ERROR: Port is incorrect ***" & @CRLF)
            ConsoleWrite("___________________________________________________________"& @CRLF& @CRLF)
            ContinueLoop
    EndSwitch

    If $tcprun = -1 Then
        ConsoleWrite($Array[$i] & " is found to be --> Disconnected" & @CRLF)
        ContinueLoop
    Else
        ConsoleWrite($Array[$i] & " is found to be --> Connected" & @CRLF)
    EndIf
    
    $cmd = 'CONNECT '&$ipAddress&":"&$port&' HTTP/1.1' & @CRLF ; 64.111.104.70 = autoitscript.com
    $cmd &= 'GET / HTTP/1.1' & @CRLF
    $cmd &= 'Host: www.autoitscript.com' & @CRLF
    $cmd &= "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)" & @CRLF
    $cmd &= "Connection: close" & @CRLF
    $cmd &= "" & @CRLF ; Added one empty line as it specifies in the RFC.
    ConsoleWrite("[Sending: #1" & @CRLF & $cmd & "/Sending]" & @CRLF)
    TCPSendRecv($tcprun, $cmd)
    
    $cmd = 'GET / HTTP/1.1' & @CRLF
    $cmd &= 'Host: www.autoitscript.com' & @CRLF
    $cmd &= "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)" & @CRLF
    $cmd &= "Connection: close" & @CRLF
    $cmd &= "" & @CRLF ; Added one empty line as it specifies in the RFC.
    ConsoleWrite("[Sending: #2" & @CRLF & $cmd & "/Sending]" & @CRLF)
    TCPSendRecv($tcprun, $cmd)
Next
TCPShutdown()

Func TCPSendRecv($tcprun, $cmd)
    Local $ret = TCPSend($tcprun, $cmd)
    If $ret = 0 Then ; If TCPRecv @error <> 0 but @error = WinAPI error!
        ConsoleWrite("***ERROR: send WINAPI: #" & @error & " ***" & @CRLF)
        ConsoleWrite("___________________________________________________________"& @CRLF& @CRLF)
        Return
    EndIf
    
    $manualTimeOut = TimerInit();7200
    While 1
        Sleep(100)
        $srcv = TCPRecv($tcprun, 2048)
        If @error <> 0 Then ; If TCPRecv @error <> 0 but @error = WinAPI error!
            ConsoleWrite("***ERROR: recv WINAPI: #" & @error & " ***" & @CRLF)
            ConsoleWrite("___________________________________________________________"& @CRLF& @CRLF)
            ExitLoop
        EndIf
        If ($srcv <> "") Then
            ConsoleWrite("Server Reply: " & @CRLF & $srcv & @CRLF)
        EndIf
        
        If TimerDiff($manualTimeOut) >= 7200 Then
            ConsoleWrite("***ERROR: Manual Time-Limit exceeded! ***" & @CRLF)
            ConsoleWrite("___________________________________________________________"& @CRLF& @CRLF)
            ExitLoop
        EndIf
    WEnd
EndFunc   ;==>TCPSendRecv

Is not working, none of them returns the Autoit Home-page - why ?!


[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

Share this post


Link to post
Share on other sites

Noep... no successes yet guys...

[Just in case u were wandering...]


[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

Share this post


Link to post
Share on other sites

anyone might help please ? any comment ? anyone tried the script ?

please help.


[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

Share this post


Link to post
Share on other sites

I'm just making sure u guys haven't forget i'm working my ass off trying to figure it out... any one cares to help ?!


[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

Share this post


Link to post
Share on other sites

good luck m8 i need this too, took a look but no idea why it doesnt work


Share this post


Link to post
Share on other sites

Interesting combination: A hidden packet sniffer and a list of Anonymizing Proxy Servers copied into a scritp...

...now what would be the first, most obvious use of such a thing...?

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

lol... these are not combined sir...

2 different topic... and actually i still can't figure what would be the first use of these :)


[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

...and actually i still can't figure what would be the first use of these :P

Yes, I see the wide-eyed innocence in your face!

:)

Edited by PsaltyDS

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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