Jump to content
Sign in to follow this  

I need help with packet sniffer!

Recommended Posts

So i wrote a packet sniffer but it doesn't completely work.


    $main_socket = TCPListen('', 15778)
Until $main_socket > 0
    $clt_socket = TCPAccept($main_socket)
Until $clt_socket > 0

$string &= "Connected to client" & @CRLF
GUICtrlSetData($Edit1, $string)

    $svr_socket = TCPConnect("",15779)
Until $svr_socket > 0

$string &= "Connected to server" & @CRLF
GUICtrlSetData($Edit1, $string)

While 1
        $Recv = TCPRecv($svr_socket,4096)
        If $Recv  Then
            $byte = TCPSend($clt_socket,$Recv)
            $string &= "[" & $byte & "B][ToClient]:" & Hex($Recv) & @CRLF
            GUICtrlSetData($Edit1, $string)
        $Recv = TCPRecv($clt_socket,4096)
        If $Recv  Then
            $byte = TCPSend($svr_socket,$Recv)
            $string &= "[" & $byte & "B][ToServer]:" & Hex($Recv) & @CRLF
            GUICtrlSetData($Edit1, $string)

So the problem is, when i launch the game launcher, everything is ok. But when i click start button to run the game, the game starts calling another process and the sniffer stop intercepting the packets...

Posted Image

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...