Jump to content
Sign in to follow this  

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 = ""

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

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 . If possible help me fix this too.

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