Visual Basic - How To Create A Port Scanner

Visual Basic - How To Create A Port Scanner


In this tutorial I'm going to show you how to create a port scanner in Visual Basic .net this code works incredibly well but is only a foundation base there's many additional features you can add to this function in order to make it more professional and user friendly. Dependent on this videos popularity I will release tutorials in the future on further advancements in this application.

Why Scan Ports?
Ports need to be opened / forwarded if you're wanting to allow incoming and outgoing bytes of data for example if you where to host a server of some kind you'd need people to be able to connect via your port to your computer. Think of a plank of wood if you poured water over it no water can go through the wood either end however if you drilled a hole in the center of the plank water could pass through this is basically what forwarding / opening a port is used for. So why close Ports? having many open ports can leave you vulnerable to Ddos attacks.

TeachComputing Channel: www.youtube.com/teachcomputing
Written Annotated Description Link: http://teachcomputing.info/tut.png
Closed Caption:

they also guys it's Alex seventies
computer today in this tutorial I'll be
showing you guys how to make a port scan
in visual basic done that now before i
go into more detail on how to program
this and what exactly it does is a
straight off the westside community is
not my channel i remember with seconds
and i'm very glad to be pushing my first
video here is also very important you
guys subscribe here as well as my own
personal channel www.youtube.com /t
computer you find this a total of more
than helpful you want to go and check
out my channel whether it's a bunch more
videos like this as well as the most
up-to-date concert by that I mean Bobby
you're putting books in my videos to my
own challenge second day and secondly to
this awesome channel was taken unity
have any favorite do I should probably
get in on how to program this now while
I'm talking I'm going to try and create
new windows forms application and what
this application is going to do is scan
for open ports and you don't understand
what an open point is used for its
basically when you connection with the
a.m incoming em data and the outgoing
data and ports allow imagine now it's a
you had a baby wall or a big cardboard
wall and transport water for it and no
one no one would go through but if you
go nail and put a little hole in there
then watching get in and out and that's
basically how you think report in my
opinion it's called off the top of my
head now if anyone think of a better way
to explain output in the description but
I guess that's a very good way of
explaining in and and the reason why you
want to check from port so close pauses
because over a if you're hosting for
example a server ever be a game or for a
chat server or whatever you need to be
able two people to be able to connect to
your computer so you need to forward a
port so this computer check with the
parts being forwarded as well as the
fact that you might not want ports open
you don't want people getting into
computer now don't get worried about
security of this because no one can
access your computer there the open port
the worst is going to happen is you get
the dust and you know it's completely
different section I don't go into the
stuff so I know about even more thorough
review i'm going to get into this
tutorial so walk while the right so
first I'm going to make a public
function i'm going to call this a scam
pole
open bracket inside byval and address a
string 5 out time out as integer equals
500 and comet by Sheree byval ports
airports as engineer and live out my
mouth as integer optional Bibles are
optional by valid timeouts as instantly
equals 500 closed bracket as boolean so
afraid our function now we're declaring
the address which for this example be
checking our own connection which will
be the localhost and we believe this is
default the Paul with the port was
scanning and the time all the time but
i'll explain that after actually see
shown to program a little more I McLaren
is a brilliant because going to true or
false statement so first off against the
cleric clients as minus that dot sockets
dog tcp climb inside try and the idea
will automatically declare or paste or
how you want say the catch acts and the
enterprise and right hand inside client
will begin connect and open brackets
we're going to type and kept it open
bracket she wants a address ports and
then nothing in common
nothing and here again sighs far loot
inside for I equals 0 to time out so i'm
having declared timeouts 500 it so
basically the time i was going to equal
to 500 and after 500 you'll see what
happens
so while that and y is 0 to 500 and
reading of red sleep and brackets 1 if
client connected equals true so
basically what this is going to do is
check connect Freeport and if it
connects then the client will close and
they will return true it means the port
is open if we can connect
and now if it's not any if it's not
returning true and if we can't
connection is not connecting to enter
the next have inside client close return
false i'm the same and the catch act of
deception flying close with to false and
now I finished our function now what we
can do is we go back to our for
applications have a list but ideal
explicitly listbox oh and we'll just put
this on the right-hand side and we're
also gonna add button now what I would
do is a text boxes for people to choose
their Christian pause male making i'll
explain when you can see the court in a
minute but the novices just a basic
application to show you the function so
we could do this for a single pole but
having to go through every single port
be an effort so let's go make a range
you're in the clear quartz as an integer
equals we call it 4-0 and will declare
Paul one as into j equals 10
so now i want to check it pause between
0 & Teller open so to do that we need to
fall to one side for ye equals pause
support warm listbox one the items that
are doing open brokers an open workers
against camp or open brackets and
quotations which IP address the address
is going to be 17.0 10.1 this is the
localhost and if for example you were
checking up a website or someone else's
computer you replace this with that IP
address and comma and then with inside I
and triple cause of your brackets
basically was going to do is while the
poor is between zero and between 10 at
listbox one will add the am and it will
scan the port the address on the port
which you can see every usage and it
will return the value in this box one
blood value being true or false if we
present go now the view farm will not be
able to do anything because we haven't
used for reading now i'll make third
tutorials on my channel how to use
friday and i'll explain that again
towards the end of God side as you can
see it's very basic just as false or one
as fossils there was false 12 free and
you would add something like
imports and then I don't yeah I do
actually the side so listbox one behind
will add and a lot and courts and on
I and then and connect gap connected
equals and then this will be the true or
false
so this should now say the poor whatever
point was if it's a little so i can yet
poor all over there
this is why they would do this because i
wasn't prepared head for this and i
usually get crap areas might least
expect it of us wins for the and we're
sorry my bud let's go on pause 0
connected equals false and give it a few
seconds and everyone also look after it
there we go Paul one connect Eagles
photos or false
now obviously make rice look nicer
undecided well but this works fine so to
show you the usage more accurately I'm
gonna scam between the points for free
590 and the port for free and 59 and
five
that's correct right for free 59 up yet
so if i press debug now and I search for
my parts they're all going to returns
false current push probably widen out
this thing do that again
they're all them palace which means
applause applause if i open a beauter
and which is I've set you turn support
for the port 445 night for enough i
debug the application and click scan por
favor no falte should be open and
because if your computer and their
control p and view the connection and I
using the port 459 fall for incoming
connections y know it's open
so for example now you could scramble to
import one and 1000 x only recommended
you scan between father arranged of 500
of ways it's going to be loading for a
while and I'm just like the time real
quick in this video I don't like doing
this and videos but yea even to sin city
pretty long tutorial I will say quickly
you finish the story now you can leave
if you like but I'm saying now is you'll
notice but you cannot do anything while
you are scouting reports too far will be
like that unless you press minimize the
desktop and this is because it's running
on a Fred it's not really on a friend
sorry which is mean if you don't the son
of multi-threading and fretting is
basically an application can only do one
thing at a time
now you might be thinking well if you
press a button and organs message box
does that in a millisecond so you don't
know is it the things like this
rochester brain function and connect and
check minutes for this box you can
notice offers open that includes moving
to farm now the way to resolve this is
to add multi-threading or the simple
things will be changed the background
work and now if you want to get tutorial
in the background worker make sure you
can subscribe to teach computing as well
as here and i'll be making a tutorial on
using fretting multi-threading and the
background work very soon
wrightwood so remember to subscribe like
comment on this video check out my own
channel youtube.com forward slash t
computer and so next time i see it

Video Length: 09:52
Uploaded By: WizzTechCommunity
View Count: 18,659

Related Software Products
Open Ports Scanner
Open Ports Scanner

Published By:
Filesland

Description:
This utility monitors open TCP and UDP ports on your PC. It brings you an enhanced functionality of a similar tool that comes with Windows operating system: netstat. Open Ports Scanner in addition to the ports information available from your operating system, allows you to map an open port to the process running on your PC. You may easily catch spyware, malware and trojans when using this tool. Just search for suspicious TCP connections. You may instantly terminate unwanted connections right ...


Related Videos
NMap 101: Scanning Networks For Open Ports To Access, HakTip 94
NMap 101: Scanning Networks For Open Ports To Access, HakTip 94

NMap can be used to obtain a much more aggressive scan than the ones we have seen so far. It's very simple to do this too, by simply adding the -A command, like this: nmap -A 10.73.31.64 Aggressive scans simply put together some of the most popularly used commands in Nmap, into one command for you to type. It uses commands such as -O, -sC --traceroute and others. We'll go over these in more detail soon. For now, simply know that -O works for operating system detection, and -sC runs ...
Video Length: 08:51
Uploaded By: Hak5
View Count: 54,875

NMAP port scanning tool
NMAP port scanning tool

please use this tool as a security tool only hr / bClosed Caption:/b font color="#CCCCCC"ok this video is intended for my CIS 160/font classicfont color="#CCCCCC" cochise college it's an/font introduction to information systems classfont color="#E5E5E5" but/fontfont color="#CCCCCC" i understand that/fontfont color="#E5E5E5" this being/font on YouTube a lot of other peoplefont color="#CCCCCC" see/fontfont color="#E5E5E5" ...
Video Length: 04:02
Uploaded By: Clyne Namuo
View Count: 46,761

Python 3 Programming Tutorial - Sockets simple port scanner
Python 3 Programming Tutorial - Sockets simple port scanner

In this Python 3 tutorial, we cover using our newly found knowledge on sockets to create a port scanner. It's a pretty slow scanner, but allows us to see it in practice. Sample code for this basics series: http://pythonprogramming.net/beginner... Python 3 Programming tutorial Playlist: http://www.youtube.com/watch?v=oVp1vr... http://seaofbtc.com http://sentdex.com http://hkinsley.com https://twitter.com/sentdex Bitcoin donations: ...
Video Length: 05:08
Uploaded By: sentdex
View Count: 26,578

Netcat 101: Port Scanning in Netcat, Haktip 85
Netcat 101: Port Scanning in Netcat, Haktip 85

Netcat 101: Port Scanning in Netcat! Welcome to HakTip -- the show where we breakdown concepts, tools and techniques for hackers, gurus and IT ninjas. I'm Shannon Morse and today i'm checking out Netcat for port scanning. First off, let's back it up a bit. I got a question at tips@hak5.org that said, "What defines the banner?" so I wanted to clarify it a bit. Last week, we discussed Banner Grabbing with Netcat, which will give you a bit of information about any server or ...
Video Length: 08:29
Uploaded By: Hak5
View Count: 24,618

Visual Basic 2008 Port Scanner + Source Code.avi
Visual Basic 2008 Port Scanner + Source Code.avi

Code: Imports System.Net.Sockets Timer1: TextBox1.Text += 1 Try Dim Range As TcpClient = New TcpClient("127.0.0.1", TextBox1.Text) If Range.Connected = True Then ListBox1.Items.Add(TextBox1.Text & " is Open") End If Catch ex As Exception ListBox1.Items.Add(TextBox1.Text & " is Closed") ListBox1.SelectedIndex = ListBox1.SelectedIndex + 1 End Try
Video Length: 06:40
Uploaded By: hacks1001
View Count: 23,485

Python 3 Programming Tutorial - Threaded port scanner
Python 3 Programming Tutorial - Threaded port scanner

Now that we've seen how to make a simple port scanner in Python 3, we've found that it is quite slow and cumbersome. So here, we tie in our knowledge of the threading module that we learned previously to dramatically improve our performance. Sample code for this basics series: http://pythonprogramming.net/beginner... Python 3 Programming tutorial Playlist: http://www.youtube.com/watch?v=oVp1vr... http://seaofbtc.com http://sentdex.combr ...
Video Length: 09:36
Uploaded By: sentdex
View Count: 19,809

How To Scan an IP Range for Open FTP Servers with Angry IP Scanner
How To Scan an IP Range for Open FTP Servers with Angry IP Scanner

[ http://geekblog.tv/1686 ] In this episode of GeekBlogTV, we take a look at Port Scanning for open FTP Servers to see what kind of juicy goodies we can find being given away! We will be using Angry IP Scanner which you can download from http://www.AngryIP.org for free. Angry IP Scanner runs on Windows, Linux and Apple for both 32 and 64 bit on all platforms; you can also compile from source, or fork a distribution by cloning this git repo from sourceforge: ...
Video Length: 03:31
Uploaded By: GEEKBLOGTV
View Count: 19,144

Copyright © 2025, Ivertech. All rights reserved.