Script file to display service , port no and

Closed
a4akk - Nov 5, 2008 at 08:07 PM
 a4akk - Nov 6, 2008 at 09:55 PM
Hello,
Please help me to write a script that displays
1.Listening services
2.the ports used by those services
3.Protocols used by those services

i can use
netstat -a | findstr "LISTEN"
but it wont give the port number

i can use
netstat -an | findstr "LISTEN"
but it wont give the service name

Thease commands give other information which i dont need. How to access and print only specific fields .In this case i need only "service name" "port No" "protocol" only.For example, the output should be like

Service Port Protocol
----------------------------------------------------------
epmap 135 TCP

Thanks in advance
a4akk

1 response

somacmg Posts 11 Registration date Wednesday November 5, 2008 Status Member Last seen April 26, 2009 15
Nov 6, 2008 at 04:58 AM
hello,

just check out this link and can you tell me afterwards if it is sucessful or not:

http://the-welters.com/professional/scripts/
0
i am not able to open the link.. can you please list out the script..
0