Jump to content
Sign in to follow this  

Need Help with starting a package sniffer

Recommended Posts


I have been trying to write a au3 script that can connect to an already established tcp connection and to receive a copy of the packages that are being send across that connection like with winpcap. My knowledge in networking programming is very limited to none.

Right now I am having a problem trying to get tcplisten to work. I keep on getting the 10049 error and I don't know how to fix it.

#include <GUIConstants.au3>


Dim $PORT = 30000


$MainSocket = TCPListen($IPADDRESS, $PORT)

If @error = 1 Then

MsgBox(0, "Error", "IP is incorrect", 1)

ElseIf @error = 2 Then

MsgBox(0, "Error", "Port is incorrect", 1)


MsgBox(0, "Error", @error, 1)


; If the Socket creation fails, exit.

If $MainSocket = -1 Then

;MsgBox(0, "Error", "Failed to create a socket", 1)




the program runs fine with an ip that isn't already established but if the ip is already established I would get the 10049 error...

I think I am approaching this problem the wrong way... It would be awesome if you could give me an example or describe how I can accomplish it.

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