Important alert: (current site time 7/16/2013 4:04:13 AM EDT)
 

winzip icon

Port Control

Email
Submitted on: 8/21/1999
By: Dustin Davis  
Level: Intermediate
User Rating: By 2 Users
Compatibility: VB 5.0, VB 6.0
Views: 27538
 
     Ever want to know which of your ports are being used while your on the net? Well, here is a full fledged application, you can scan ports in ranges such as 1-65530 or you can select 11 diffrent ports to scan, and you can watch 2 ports to see if incoming data is being sent on that port. good to see if someone gave you a trojan! And with the timer control, you can automate your scans and even save them to a log file!
 
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.
  3. Scan the source code with Minnow's Project Scanner

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 43 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 Intermediate 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
8/22/1999 9:12:00 PMBootleg Software Inc

Please Send in some comments! Let me know how useful this code was!
(If this comment was disrespectful, please report it.)

 
8/23/1999 2:30:00 AMNovaCode

Dustin, your a legend, this is exactly what I needed.
Thanks dude.
I look forward to seeing more of your INTERNET related applications.
(If this comment was disrespectful, please report it.)

 
8/26/1999 6:16:00 PMzWa53

heh, i just wanted to know, can i make a firewall wit this shiznits?

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

 
8/26/1999 8:03:00 PMBootleg Software Inc.

I dont even know how to use a firewall, so i couldnt tell you! If you find out, let me know
(If this comment was disrespectful, please report it.)

 
9/8/1999 11:34:00 AMDane

Firewalls are used to block all communications to the specified port and you can specify different ip/tcp addresses to block completely.. (Pheew)
(If this comment was disrespectful, please report it.)

 
9/8/1999 11:36:00 AMTmess

This seems great but how do I know if a trojan is installed on my machine??
(If this comment was disrespectful, please report it.)

 
9/10/1999 3:09:00 PMAaron

This is possibly one of the best coded programs i have ever seen
(If this comment was disrespectful, please report it.)

 
9/11/1999 12:55:00 PMNick

now that I have this code how do I use it?
(If this comment was disrespectful, please report it.)

 
9/12/1999 4:00:00 PMSniper009

Anyone have ICQ? Message me at
34062038 and ask for authorizacion saying: Source planet! and ill let you add me. Cool!!
(If this comment was disrespectful, please report it.)

 
9/12/1999 9:48:00 PMHelp

Is there anyway to Close the Ports?
(If this comment was disrespectful, please report it.)

 
9/13/1999 12:07:00 PMJohn Ryder

It shouldn't be all that hard to make a firewall. Just use an arrary of mswinsocks. On winsock1_connectrequest, it should use the winsock.sendata command to send a message to whomever is trying to connect that the port is being blocked. Next, it should close the connection and reset itself using winsock1.close, then winsock1.listen.
On form_load, the winsock1.localport should be set to whatever port needs to be blocked. Try using a for / next loop to access all elements of the arrary. If i ever get around to making one, i'll post it.
(If this comment was disrespectful, please report it.)

 
9/21/1999 5:25:00 AMmicke

RE: close a port

objeckt.close, and port num#

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

 
9/23/1999 8:06:00 PM(~°«-_Racer_-»°~)

I am working on a firewall. I want this to be a good enough to sell in stores
and protects you 100%.Even if someone
somehow gets past it it will disconnect on connection. I just need some codes please!ICQ# 40250028
(If this comment was disrespectful, please report it.)

 
9/23/1999 8:10:00 PMRacer again

I tried to Open the Port Scanner Project using VB5 CCE and it wouldnt let me open it.I just got an error message it it never opened.Help! hehe
(If this comment was disrespectful, please report it.)

 
9/24/1999 7:19:00 AMsean mckeown

i will be sure to post a complete code for my new program. The source code contains instructions on how to build a firewall, port scanner, and self port monitoring system. If you are interested in me posting this code mail me. I will not post unless i get some response.
(If this comment was disrespectful, please report it.)

 
10/7/1999 8:06:00 PMgrant

does the port scan need vb6 or 5 to run
thanks
(If this comment was disrespectful, please report it.)

 
10/10/1999 6:47:00 PMDaniel Errante

This is code for if you want to make a firewall. In your firewall app, you should pop up a message box saying if you want to reject/accept a connection on a port. This is exactly like a firewall if you do this.
(If this comment was disrespectful, please report it.)

 
10/14/1999 9:29:00 PMJim

1) great program Dustinm been lookin for code like this before...
2) now we need something to determine what is running on a particular port IE whats port 1410, 1416 and 1417


Sean ya I am interested in your code post it ...
(If this comment was disrespectful, please report it.)

 
10/20/1999 8:48:00 PMFlipmojo

Hey man NICE program! Does anyone know how to reg. winsock.ocx or
of a place where i can download it or buy it?
thanks!

E-MAIL ME WITH ANY SUGGESTIONS
(If this comment was disrespectful, please report it.)

 
11/17/1999 8:47:00 PMBootleg Software Inc

HAHA! Your an idi0t mike!! My program was developed and posted a month BEFORE Hackers Office 2000! Hello why dont you look at the dates!! Pay attention
(If this comment was disrespectful, please report it.)

 
12/31/1999 12:04:47 AMJohn DeW

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

 
3/4/2000 3:38:53 AMmoon13

hey ! good code !! but i still have a problem, how can i see the data exchange of a used port of other program ? thanks
(If this comment was disrespectful, please report it.)

 
10/25/2002 4:01:31 AMPeter Winter-Smith

Hmm, not bad, but you should've used winsock cloning to extend the 11 max ports to scan... That way you could've increased the amount.
Can I also recommend that you change 65530 to 65536, I'm pretty sure that there are that many ports... You'll have to check. Anyway, nice work!
~Peter
(If this comment was disrespectful, please report it.)

 
6/8/2005 9:48:47 PM

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

 
6/8/2005 9:50:45 PM

VB 5 Professional failed loading PortControl.vbp and received error "Retained is an invalid key". Please advise.
(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.