u can use netstat... it will display all open ports. you can save the output to file (to get the open ports)

hope that helps
taLON