Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Find which ports program is using?h

  • 26-05-2005 12:23pm
    #1
    Registered Users, Registered Users 2 Posts: 813 ✭✭✭


    Is there a way of finding out which ports a c++ program is using?As far as i'm concerned its only using port 80 and 8080. Reason i'm asking is cause i'm behind a college proxy and need the ports i'm using to be opened.I've got those two opened and it still doesn't work.I know it works as i've tested it at home.
    Any help much appreciated.


Comments

  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes




  • Registered Users, Registered Users 2 Posts: 597 ✭✭✭bambam


    or the rather excellent process explorer from sysinternals.com
    Right-click on a process and bring up properties, then click on the TCP/IP tab to view connections/ports


    http://www.sysinternals.com/ntw2k/freeware/procexp.shtml


  • Closed Accounts Posts: 110 ✭✭Adblock


    i assume win XP or in that family

    do do type then
    start -->run-->cmd->>netstat -a or -n

    will list all active connections ie open ports

    #.#.#.#:portopened

    like 6.32.166.8:80 ESTABLISHED

    if u r on a network the list could be long so if u want to analysis it

    netstat -a >>c:\mytextfile.txt
    will boot out the output to the txtfile: create the txtfile first though

    hope this is what ur looking for.
    if u open ie or firefor and do b4 and after netstats ull see ports 80 gets opened


  • Registered Users, Registered Users 2 Posts: 15,443 ✭✭✭✭bonkey


    Adblock wrote:
    netstat -a >>c:\mytextfile.txt
    will boot out the output to the txtfile: create the txtfile first though

    You only need to create the file in advance because >> is an "Append" operation. Use > instead and it will create the file for you (or, I believe, overwrite it if it already exists).

    jc


  • Registered Users, Registered Users 2 Posts: 813 ✭✭✭dave13


    Thanks for the replies. ProcessExplorer solved my problem and gave me another in showing my program is opening ports at random. Quite a handy tool though.


  • Advertisement
Advertisement