Jump to content

TCP Connection State


Caleb
 Share

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()
     Select
          Case $TCPState( "myprocess.exe" ) == "ESTABLISHED"
               Do some_func()
          ...
          ...
      EndSelect
WEnd
Edited by Caleb
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...