Thread: Netstat

  1. #1
    The Master of Puppets MetallicA's Avatar
    Join Date
    Nov 2004
    Location
    Earth
    Posts
    5

    Netstat

    I'm looking to write a program that monitors netstat and logs any new connections established. My brother(who is a programmer) said it shouldnt be that hard. My only(known) problem is getting the info from netstat. Anyone know how i can do that? I'm kinda new to programming, so go easy on me.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Code:
    system( "netstat > file.txt" );
    Then open the file and read it

  3. #3
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    Also, the GetTcpTable() and GetUdpTable() windows functions return similar information.

  4. #4
    The Master of Puppets MetallicA's Avatar
    Join Date
    Nov 2004
    Location
    Earth
    Posts
    5
    Thanks for the help. I'll probably have some more problems I'll need help with as time goes on.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. What Port is it Using?
    By jrahhali in forum Networking/Device Communication
    Replies: 5
    Last Post: 06-25-2005, 08:26 PM
  2. There is no netstat
    By Micko in forum Tech Board
    Replies: 2
    Last Post: 07-08-2004, 02:27 PM
  3. Netstat, nbtstat, nslookup, what else?
    By Stan100 in forum Networking/Device Communication
    Replies: 3
    Last Post: 07-01-2004, 10:19 AM
  4. Optus Netstat
    By robid1 in forum C Programming
    Replies: 6
    Last Post: 04-16-2003, 12:44 AM