Sign in to follow this  
Followers 0
7h331337

passive tcp proxy

5 posts in this topic

i started to make a passive proxy in autoit but it is not fully functional and i am out of ideas i was wondering if any one could help thanks

$timer= 1
$timer1 = 1
TCPStartup()
Global $proxyin, $proxyout, $proxyin1


$proxyin1 = TCPListen("127.0.0.1", 89)

Do
    $proxyin = TCPAccept($proxyin1)
    Sleep(10)
Until $proxyin > 0
While 1

    Sleep(100)
    $inrecv = TCPRecv($proxyin, 10000)

    If $inrecv > "" Then
        ConsoleWrite($inrecv)

        Do
            $proxyout = TCPConnect(_site($inrecv), 80)
            Sleep(10)
        Until $proxyout <> -1
        ConsoleWrite(0)


        TCPSend($proxyout, $inrecv)
        $ourrecv = ""
        $timer1 = 0
        Do
            Sleep(500)
            $r = TCPRecv($proxyout, 10000)
            $ourrecv &= $r
            $timer1 = $timer1 + 1
        Until $r > " " or $timer1 = 10
        Do
            Sleep(100)
            $r = TCPRecv($proxyout, 10000)
            $ourrecv &= $r
        Until $r = ""


        ConsoleWrite($ourrecv)
        TCPSend($proxyin, $ourrecv)
        $inrecv = TCPRecv($proxyin, 10000)
        TCPCloseSocket($proxyin)
        Do
            $proxyin = TCPAccept($proxyin1)
            Sleep(10)
        Until $proxyin > 0


    EndIf
WEnd
Func _site($string)
    Local $site = StringSplit($string, @CRLF)
    If $site[2] < " " Then
        $site = StringSplit($site[3], ":", 1)
    Else

        $site = StringSplit($site[2], ":", 1)
    EndIf

    Return TCPNameToIP(StringStripWS($site[2], 8))
EndFunc   ;==>_site

Share this post


Link to post
Share on other sites



bump :)

Share this post


Link to post
Share on other sites

Help with what? :)

basically the proxy will only half load images and some times dose not fully load all of the content from a page i was wondering if anyone could see anything wrong or could suggest anything

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