Jump to content
Sign in to follow this  

TCP Connection State

Recommended Posts


I'm looking for an small example for getting a tcp connection state for processes. Basically I need to put in a process name and get a variable output with "ESTABLISHED, LISTENING, TIME_WAIT", etc.

A good example is this: ?do=embed' frameborder='0' data-embedContent>

?do=embed' frameborder='0' data-embedContent>

Well, just the part where it displays the connection state.

?do=embed' frameborder='0' data-embedContent>'ve read his source and can't quite interpret it to my needs. I'm kind of a novice with autoit. I don't know much about how DLLs work or how to use them, and after searching autoit help and the forums, I've concluded I'll most likely need to use iphlpapi.dll to do this.

Any example would be nice! :graduated:

My goal for this is a little project for class. I'll have a Case for each state and a different colored box for each step. It must be for specific processes, not "all connections"

While 1
     $TCPstate = func_to_get_tcp_state_for_process()
          Case $TCPState( "myprocess.exe" ) == "ESTABLISHED"
               Do some_func()
Edited by Caleb

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.