Important alert: (current site time 10/31/2014 5:18:28 AM EDT)
 

winzip icon

Multi-threaded Port Scanner

Email
Submitted on: 1/17/2003 12:09:56 PM
By: Niknak!! 
Level: Beginner
User Rating: By 17 Users
Compatibility: VB.NET
Views: 46341
(About the author)
 
     This is a simple multi-threaded port scanner programmed in VB.NET. It shows a way of connecting to a remote host via a specific port using VB.NET's free threading capabilities. Please don't use this to scan anyone other than yourself though, its simply an example.

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 9 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

1/18/2003 1:32:30 PM

Very Good! I can only find one (slight) point of criticism: The listbox, which shows the ports, should scroll down automatically, if the number of ports exceeds its showing limit. So the user doesn't have to click on the scroll bar frequently. But apart from this minor thing it's perfect! All 5 from me :)
(If this comment was disrespectful, please report it.)

 
1/18/2003 5:03:27 PMNiknak!!

Thanks, I've updated it so that it does as you suggested.
(If this comment was disrespectful, please report it.)

 
1/19/2003 5:32:57 AMReza Alizadeh

What would be nice is to see this app take advantage of VB.Nets free threading capabilities.
(If this comment was disrespectful, please report it.)

 
1/19/2003 7:52:36 AMNiknak!!

I'm having a go at it, quite confusing though how the New statement doesnt seem to make a new instance, oh well, I'll work it out... I hope :-\
(If this comment was disrespectful, please report it.)

 
1/19/2003 9:24:55 AMNiknak!!

Now multi-threaded, thanks for the idea ;)
(If this comment was disrespectful, please report it.)

 
1/21/2003 4:50:01 PMReza Alizadeh

Cool Niknak. Thanks for being open to new ideas. Great job, 5 globes from me.
(If this comment was disrespectful, please report it.)

 
1/21/2003 4:59:00 PMReza Alizadeh

Very nice. I just checked out your code. I like the way you got around the problem of not being able to send arguments to a function thats being called as a new thread. Glad to see programmers like you are posting your code, allowing others to learn.
(If this comment was disrespectful, please report it.)

 
1/21/2003 5:12:10 PMNiknak!!

Thanks loads :)
(If this comment was disrespectful, please report it.)

 
1/29/2003 8:55:15 PMFrank Macall

If we only will get more people like you Niknak , with not only a superb piece of code that you share with all of us, but been able to take sugestions and spend time working on them. You get my five stars also.


(If this comment was disrespectful, please report it.)

 
1/29/2003 11:23:57 PM

I found the code and idea to be rather trivial. Don't wanna give you 3, you're doing good, so 4 from me.
(If this comment was disrespectful, please report it.)

 
1/30/2003 5:40:37 AMNiknak!!

Understandable, I actually made it for 2 reasons, 1 just as a first go at VB.NET and secondly because I was experiencing network security issues myself and by the use of the application I found that I had several dubious ports open that I was able to stop immedietly. thanks :)
(If this comment was disrespectful, please report it.)

 
2/7/2003 8:58:36 PMSteve Peters

It could use a little validation in the from and to boxes. The max port available is 65535 (MAX_SHORT), so there is a constant for that. I was able to enter 77000 to 77000.
(If this comment was disrespectful, please report it.)

 
2/8/2003 10:31:21 AMNiknak!!

Done as you suggested "Steve Peters".
(If this comment was disrespectful, please report it.)

 
2/13/2003 10:16:15 AM

Very good you get a five from me.
(If this comment was disrespectful, please report it.)

 
3/13/2003 6:00:01 AM

good code, five stars from me. nice to see someone putting some effort into listening to feedback.
(If this comment was disrespectful, please report it.)

 
4/11/2003 12:12:53 AM

Great scanner!

Wish lists:

scan a range of IP addresses

get back banner information for open ports
(If this comment was disrespectful, please report it.)

 
6/2/2003 7:57:26 AM

Good job, keep it up.
(If this comment was disrespectful, please report it.)

 
7/24/2003 6:49:52 AMNico Ecke

Very nice and slim...
I like it...

But I also have some criticism:
1. Would be usefull to enabel it to scan ranges of ip-adresses.
2. some more info's about the running services at the open ports would be usefull...
3. the sorting of the ports isn't very well... would be nice if port 3 could be scanned before port 20...

I will try to extend it a little... I will inform you about it... .
(If this comment was disrespectful, please report it.)

 
6/17/2004 12:37:37 AM

Hi author,
thanks for your code, it is a good code. I was trying to make an examble like your project (same your code) but in C#, when i done and took a test, you know, your program done faster than mine althought everything is the same with your code, do you know why? can you explain?
(If this comment was disrespectful, please report it.)

 
3/4/2005 3:11:17 AM

wacked out code! awesome
(If this comment was disrespectful, please report it.)

 
3/16/2005 5:02:49 PM

Good job
I've ported it to C# if anyone is interested
(If this comment was disrespectful, please report it.)

 
3/16/2005 5:03:31 PM

^^ That's me
(If this comment was disrespectful, please report it.)

 
3/31/2005 7:53:18 AM

I have a USB Scanner and is not working with this code. Any Comments ?
(If this comment was disrespectful, please report it.)

 
3/31/2005 7:53:49 AM

I have USB Scanner. And this code is not working with that. Any Comments ???
(If this comment was disrespectful, please report it.)

 
7/27/2005 11:28:57 AMBennyBug

Nice code,
Have you tried to scan UDP ports instead of only TCP ?
(If this comment was disrespectful, please report it.)

 
7/4/2006 9:54:09 PMalberto

in VS 2005 it doesn't work and there are some warnings to avoid
(If this comment was disrespectful, please report it.)

 
10/22/2007 1:23:18 PMjfebrer

para que funcione en VS2005 unicamente aņadir Control.CheckForIllegalCrossThreadCalls = False
en la carga del formulario.
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.