Simple TCP Port Scanner

By Munir

During the course of Computer Communication in last semester, I tried to develop some network tools in C#. Among all, I found it most interesting to develop a simple multi-threaded TCP port scanner using some built in classes of System.Net namespace. Today I modified it bit more and added some options to make it customizable. You can get its source from here and complete VS 2005 project from here.

Update: Some design improvements. Thanks to Whiz Kid for suggestions.

16 Responses to “Simple TCP Port Scanner”

  1. ayaz Says:

    That is nice. I checked the source. If I have read it correctly, it starts scanning from port 0 and goes on till port 65536. It should check ports in the range 1 .. 65535, inclusive.

  2. munir Says:

    Thanks for visiting my blog and pointing out the mistake, Ayaz. I have fixed this and uploaded the latest version.

  3. whiz kid Says:

    *yawn*…

  4. whiz kid Says:

    >> public void run()

    Java ka keera gaya nahin abhi tak!? ;)

  5. munir Says:

    > Java ka keera gaya nahin abhi tak!? ;)

    :-) Just because I like using Java coding style and camel notation.

  6. Ayaz Ahmed Khan Says:

    Heh. I have come to acknowledge that programmers tend to be both bitchy and arrogant. :-P I profess openly I am one — and I am damn bitchy and arrogant when it comes to chosing and sticking to coding styles and whatever goes with it.

  7. munir Says:

    LOL!

    But when you work in a team, sometimes it becomes necessary to follow standards. I always follow style of my choice if it comes to personal projects. So I think you can count me in too :)

  8. ayaz Says:

    When I am part of a team, I tend to force others to follow the style I use. :-P

  9. munir Says:

    Nice :-D

  10. whiz kid Says:

    >> /* A simple multi-threaded Port Scanner
    >> * Author: Munir Usman http://munir.wordpress.com
    >> * Contact: *@gmail.com
    >> */

    Date? =)

  11. munir Says:

    Duh!

  12. Tanwiri da RIPPER Says:

    hmmm .. geeky bachay geeky harketein …. do something fruitful with your time and free life

  13. GhosT Says:

    hey,
    i am working with sockets in java…i am developing a software which will detect any game servers (Counter Strike, Warcraft if theres a host)…so i need to check all available and active IP addresses in some specific ports..any idea???

  14. GhosT Says:

    mail me in fhratul@live.com i need to consult beacuse um not good in java…still learning.

  15. rishi Says:

    hie ….this will be more helpfull if u write a full source codes on these pages aa well……well for c codings refer mah site n for more hacking techniques….http://www.rishilopez.blog.co or http://www.rjrishi.blog.co.in
    or search on google rjrishi

  16. rishi Says:

    hie ….this will be more helpfull if u write a full source codes on these pages aa well……well for c codings refer mah site n for more hacking techniques….http://www.rishilopez.blog.co.in or http://www.rjrishi.blog.co.in
    or search on google rjrishi

Leave a Reply