Jump to content

tcp packet logging


Recommended Posts

I would like to log the raw data of all incoming packets from port = 1234 and ip = 63.241.83.?? , but so far I keep getting errors.

My Broken Code:

Dim $vPacket = ""

TCPStartUp()
$iListen = TCPListen("63.241.83.11", 1234)
$iSocket = TCPAccept($iListen)
While True
    $vPacket = TCPRecv ($iSocket, 1024)
    If @error Then $vPacket = 0
    _FileWriteLog(@ScriptDir & "\my.log", $vPacket)
WEnd

Can someone please fix this code.

Also, I don't know how to select a range of IPs like 63.241.83.?? so the code above specifies 63.241.83.11 . If possible help me fix this too.

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