Sign in to follow this  
Followers 0
Caleb

TCP Connection State

1 post in this topic

#1 ·  Posted (edited)

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()
     Select
          Case $TCPState( "myprocess.exe" ) == "ESTABLISHED"
               Do some_func()
          ...
          ...
      EndSelect
WEnd
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  
Followers 0