Sign in to follow this  
Followers 0

Need Help with starting a package sniffer

1 post in this topic


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  
Followers 0