Jump to content

TCP + HTTP Request + Proxy/Sock


phew
 Share

Recommended Posts

hi guys!

TCPStartup()
$start = 1
$socket = TCPConnect(TCPNameToIP('www.autoitscript.com'), 80)
$cmd  = 'GET / HTTP/1.1' & @CRLF
$cmd &= 'Host: www.autoitscript.com' & @CRLF
$cmd &= 'User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9' & @CRLF
$cmd &= 'Connection: close' & @CRLF
$cmd &= '' & @CRLF
TCPSend($socket, $cmd)

While (1)
    If ($start = 1) Then
        $srcv = TCPRecv($socket, 512)
        If ($srcv <> "") Then
            MsgBox(0, "", $srcv)
        EndIf
    EndIf
WEnd

this is my little script. but how do i make it work with proxy/sock? i read alot about sock5/4 and proxy protocol but i have no clue how to implement a sock/proxy into the script, so that the *.au3 is using a proxy/sock when connecting to the host.

help pls!

king regards

Link to comment
Share on other sites

another question: is this possible at all? is it possible to force the socket, which is already connected to the sock4/5 or proxy, to connect to a website without losing the connection to the sock4/5 or proxy?

greetings

Link to comment
Share on other sites

@phew

If you figured it out why don't you post it.

We all can still a lot. ;)

Regards

ptrex

81.x.x.x = sock5 ip

64.111.104.70 = autoitscript.com

(...)
$socket = TCPConnect('81.x.x.x', 5728)
$cmd  = 'CMD CONNECT 64.111.104.70:80 GET / HTTP/1.1' & @CRLF
(...)

CMD CONNECT is explained in the sock5 reference i posted above :P

hope this helps others!

Edited by phew
Link to comment
Share on other sites

  • 3 years later...

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...