Sep 22 2005

Joe's Simple Port Scanner

Category: Selfish MotivationJoeGeeky @ 16:39

One day, a friend came to me and asked how to scan a TCP or UDP port.  With that question, I wrote a simple little port scanner to demonstrate at least one approach to the problem. Once written I found out that it wasn't one port but thousands. Well, now it is time for some metrics... As it turns out, my little sample took 2 minutes and 5 seconds to scan 1024 ports. While it worked, it needed to be faster.  After scratching my head a bit, I wrote a new port scanner that performed scans on a pool of threads.  Now it scanned the same port range in 2.2 seconds. What can I say, multithreading is groovy stuff.  :-)

 

Tags:

Comments

1.
Raegan Raegan United States says:

You had some good ideas there. I made a search on the issue and noticed most peoples will agree with your blog.

Comments are closed