Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fastest way to determine and open/closed udp/tcp port

Status
Not open for further replies.

emat

Technical User
Sep 20, 2005
18
BE
Hi all,

I'm trying to make a script that checks weather a certain tcp or udp port is open, yes or no.

I'm wondering what's the fastest way to determine a tcp or udp is open or closed?

What should I be using?
 
This is an interesting problem.
An open port is easy cos you'll get an answer.
A closed port is a different issue completely.
Here you wait for a timeout so I guess it's down to how long you want to wait. If you timeout too quickly you'll miss open ports on busy or slow servers. If you wait a long time you'll be slow.
The choice is yours I guess!


Trojan.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top