Welcome to this lecture.
In this lecture.
We're going to make our own body scanner with the help of our escape module.
So before that let me just open my terminal in the galley Linux and show you about the net discover.
So if I say net discover is the program and let me just give the interface which is obviously made of
waste of land zero which is wireless network.
If I hit into it is going to be scanners and it is going to give us all of the IP addresses and MAC
addresses of dead devices that is connected to our network.
So again see these are the three devices that is connected one with being a router which is obviously
the gateway over here and next one is the devices.
That is the hardware that is connected to this network.
So we're just making this program with the help of python in our python module.
So before that.
Just remember what we are going to do.
So first of all you can see that we have this machine.
So just remember this is our machine.
And maybe this is the line so you can see this is a mobile and this is the PCs that are the clients
over here.
And this is a server obviously and the Internet maybe we have the router here and this is maybe it ought
to.
And this has its own IP and MAC address because we have said here that every devices has its unique
MAC.
So if I just go over here and so you that these devices being the router has its own new mac address
and this has its own.
So every device has its own MAC addresses which is unique from each other.
So they're unique because every packet has to send to some of the devices.
So it is to recognize that device.
So if I say that I want to distinguish so this device from this device then it is not from IP address.
This is done from the MAC address.
So whenever the packet is sent from the louder then that that time it is helped by this MAC addresses.
So packet is send in this macro addresses rather than just saying the IP.
That means MAC address is very important information together because a packet is sent with the MAC
addresses so there is to information that is related to the packet.
So let me say this is the package that is sent.
Then there will be the header and some of the information over here.
So there will be source MAC address.
That is the Makris of the source which is going to send that packet.
And another is a destination MAC address which is going to receive this packet.
So this too is a very important information.
So first of all there is a one protocol which is going to be our ERP protocol which stands for address
resolution protocol.
So just remember that we have the AARP protocol to deal with in this Celexa.
So before that.
Let me show you how this packet routing works in the Internet.
So first of all what happens is this is the client.
And if this client wants the information of other clients that is connected in the Internet and if this
one is to give the information about the client or the MAC address of the client.
So let me say it is done by first.
The air P request.
So this client being this client which is connected to the same Internet that other client are connected
this will first give the air request.
So it will just say a request sent to the router saying who has this IP address.
So first of all it will just send this IP address that is unique.
Maybe this client will just give the ATP request in the form of the IP saying that who has this IP address
and this is send over all of the claim that is connected in the Internet through the broadcast MAC address.
So after that if it broadcast all of these air request then the client will have its own IP address.
So this has one IP address and this client has its own IP address.
So this IP address or basically this request we just send from this plane will be ignored by those client
who is doesn't have disappeared.
So if this says something like OK who has this IP address then daughter to dot one or two maybe four
and if this is diabetes of this client which is the computer but not of this mobile that means that
this message which is a R P request will be ignored by this client and this client will just get the
air response saying that I am this client which have this IP address back to this broadcast manager
and this will see that.
OK.
This client has the MAC address and this is the address resolution protocol.
And the next thing is very important information nobody here is a MAC address.
And MAC address is very important because this is not obviously the Mac that we are going to use which
is obviously the computer.
So MAC address is a Media Access Control address.
So it is basically the hardware identification number that is uniquely identifying the easy devices
on the so I've shown you in our little nuts over here that each of these devices will have the unique
MAC address which is to identify between these devices.
So if you send any package from these devices from one devices to another this MAC address is going
to be unique so that that packet can be traced or that packet will be identified are the package will
be delivered to the right devices.
So this is the important information MAC address so we'll just call this the net discover with the help
of byte up now.
So before that let me just make you real quick what we're going to do so first of all we have to make
the request and then we have to make a broadcaster.
So in the broadcaster what happens is we'll just send this at a request saying that OK you need to send
that ERP request to the broadcast MAC address which will just determine who its clients are connected
to network and it will just get this information of the claim that are connected to the network from
this port scanner module.
So in this selector we are going to make a Skippy module.
So let's get our by Tom Brady and let's see how we can this make our escape module on board the scanner.
So first of all let me just say delete all of this.
Let's go back to our item.
So here the first thing what you need to do is you have to just go to your project create a new python
file I have already cleared and named is a mean dot boy.
So next thing if you see here we want to go to the settings and under this your project key log which
is the name of your project go to the project interpreter and just add these KP modules over here.
So I'll just say Skippy and install that escape module and I have a little done over here you can see
right here we have the Virgin of this cape you over here.
If a place Okay now we can get that escapee module to work for us.
So first of all I'll just import that escaping module all.
So all is basically to implement every module of this KP.
That means we can use everything that is declared inside that escape module over here.
And I want to alliance it with escape him.
So every time when I want to use that escaping module I don't need to write escape it at all.
Instead I can just see for it with escape.
So now next thing I want to do is I want to make a function that is going to the scanner function as
a spicier IP address so that is to be scanned.
So this is our function.
So next thing is to use this escapee and I'll see our ping.
So this is the method that is going to speak for us so next thing what we need to do is we need to this
make this scanner work with IP address so if we just go to the command prompt over here and if a source
for our IP then it is connected over here also the IP address is 1 9 2 1 6 8 to 1.
So if I just say go here and I'll just pass your 1 9 2 1 6 8 dot 1 dot.
So first subnet in this IP is going to be the gateway.
So first of all we want to have the gateway and to include every subnet from one which is obviously
this digit 2 2 5 4 We need to just put this has to end for that is to include every subnet on this network
or basically on this IP address.
So just passed this last 24 to include every subnet of this IP address.
So next thing what you need to do is simply go to the run run this men and give it a time to run
NAFTA has begin their mission.
Let's see how this works.
So it has received the package and God three answers so these answers are responses.
And it has shown that remaining three hundred two hundred fifty three packages went unanswered.
That means that we just got three and so that means three devices are connected to this network so we
can see we got the same.
That is the MAC address and IP address that we just got from the coloring nuts over here which were
the net discover.
So what we just did in this elixir was we made our escapee module to work for the scanner.
We didn't do anything good over here because it was just a one line code.
We'll see under the hood how this works in the upcoming letter.
But for now what we just did was we just passed the IP address or every subnet of that IP address that
is connected to here and we just say get these are going to work for us so what we just did over here.
So let me show you real quick.
So first of all we just did something like this was a client.
So basically this is us and we want to give the ATP a request.
So it is giving us the request.
So it is a C giving us their request of maybe 10.
So it has IP address over here.
So let me go real quick.
So if I saw you here then this is your IP address and that is 1 9 2 1 6 8.
So it is just suing us over there.
So if I just go back and it is just giving a Arabic request with that IP which is 1 9 2 1 6 8 and that
is 1 which is obviously the gateway the first ip and after that it is just giving this everything is
in Arabic was to just broadcast to manage it out of broadcast.
So after that it is giving this to the broadcast MAC address and it is just referring to every client
and that means this every client will be included inside this IP address so they will also give the
IP response back to the devices.
That means it will just capture the MAC addresses of each of these devices which is just done in this
letter which is right over here.
So if we see in the BI Some you'll see that we just captured every MAC address and guard the IP obviously
IP is inside this subnet.
So after that we just get every MAC addresses which is just sending us the ATP responses so we can see
we got three answers so this is very important assuming the but here we go three answers so these are
the responses and other are on answer.
So there is 253 packet that is unanswered so this is very important.
We just receive three packages that means we have just three connected device to the network.
So now in the next lecture we'll make our own a scanner with the help of the algorithm that we just
learned here.
So instead of just using these are being we can see how broadcast work.
How does this make the air request.
How do this combine those broadcasts in their request and send to the network so that they will just
say give us the answer or responses back to us so that we can just modify it and make our complete.
Again this net this October but in a more robust way.
So see you in the next one.