WEBVTT

00:00.840 --> 00:07.760
Okay, now we don't need this line of code because these were just for showing more details.

00:07.880 --> 00:09.960
Okay, now I don't need them.

00:13.720 --> 00:14.120
Okay.

00:14.880 --> 00:17.920
Now the this part.

00:17.960 --> 00:18.160
Okay.

00:18.200 --> 00:19.440
This part is complete.

00:19.800 --> 00:22.800
And now it is time to send the broadcast.

00:22.840 --> 00:23.760
Okay.

00:23.800 --> 00:25.000
Send the broadcast.

00:25.240 --> 00:30.360
So in Scapy we have a function called SRP.

00:30.400 --> 00:30.720
Okay.

00:30.760 --> 00:33.680
Send and receive packet or send and receive.

00:34.440 --> 00:36.360
So here we are going to use that okay.

00:36.360 --> 00:39.240
Let's use Scapy dot SRP.

00:40.680 --> 00:44.360
And here we need to give the uh packet.

00:44.400 --> 00:44.600
Okay.

00:44.640 --> 00:49.080
It is ARP request and broadcast.

00:49.120 --> 00:51.400
This is the packet that we want to send.

00:51.920 --> 00:58.200
And while we send that packet here you will receive two things okay.

00:58.240 --> 00:59.800
One answered.

00:59.840 --> 01:00.880
Okay.

01:00.880 --> 01:02.160
That is here.

01:02.200 --> 01:04.380
And it is telling that I have this these.

01:04.780 --> 01:07.500
And also when an answer.

01:08.020 --> 01:11.100
And for example you will send this packet to this one.

01:11.100 --> 01:16.220
And to this one the router will receive the packet that is not answered.

01:16.260 --> 01:17.380
Okay.

01:17.420 --> 01:19.660
From router that is not answered.

01:19.660 --> 01:21.780
So we need to handle that as well.

01:21.780 --> 01:24.660
So we are receiving to the thing here.

01:24.660 --> 01:26.500
One of them is the answer.

01:26.500 --> 01:32.980
So let's name it answered and and answer.

01:36.140 --> 01:44.220
So now we have this both here and also we have one more thing.

01:44.220 --> 01:45.580
And that is the timeout okay.

01:45.580 --> 01:51.580
For example it will send the packet to the whole computers okay.

01:52.180 --> 01:55.260
And it will wait for a lot of time.

01:55.260 --> 01:58.460
So you need to give a timeout to this for example one second.

01:58.460 --> 02:05.180
So for the first computer if it did not receive any answer it.

02:05.220 --> 02:09.770
For example wait for one second and then go for the for the next client.

02:09.810 --> 02:13.530
So if you don't give it so you will be back here.

02:13.530 --> 02:18.570
I am going to give that timeout to one for example.

02:18.610 --> 02:19.050
Okay.

02:19.810 --> 02:25.090
And now let's print uh some of them.

02:25.090 --> 02:28.650
For example we have answered summary.

02:31.850 --> 02:33.570
Let's see what do we have here.

02:33.610 --> 02:34.050
Okay.

02:41.050 --> 02:46.130
Now you are seeing that finishing sending 256 packet.

02:46.170 --> 02:46.370
Okay.

02:46.410 --> 02:53.650
Which is, uh, sending for all computer and only receiving three packets.

02:53.650 --> 02:54.130
Okay.

02:54.170 --> 02:55.450
Got three answered.

02:55.930 --> 03:01.850
And the whole thing that is not received, which is not which is unanswered.

03:01.890 --> 03:04.170
Okay, 253 packets.

03:04.770 --> 03:12.270
So here you see, we have either ARP who has it is saying it is telling that who has this IP address,

03:12.550 --> 03:14.470
say this one, which is my computer.

03:14.510 --> 03:14.910
Okay.

03:16.230 --> 03:22.310
And it is telling me that the IP is at.

03:22.350 --> 03:25.750
It's telling that I have this IP which is the router.

03:25.790 --> 03:26.110
Okay.

03:26.150 --> 03:28.510
And my Mac address is this one.

03:28.790 --> 03:29.910
And also this one.

03:29.910 --> 03:31.910
My Mac address is this one.

03:31.910 --> 03:33.590
And also the other client.

03:33.630 --> 03:34.390
Okay.

03:34.430 --> 03:36.910
Telling that my IP is this one.

03:36.910 --> 03:38.670
And I have this Mac address.

03:38.990 --> 03:42.150
And here it is asking that who has this IP.

03:42.790 --> 03:45.990
And the client is responding that I have this IP.

03:45.990 --> 03:49.270
And in my Mac address is this one.

03:49.310 --> 03:50.110
Okay.

03:50.150 --> 03:54.830
So my computer is asking and it is sending for all the client.

03:54.830 --> 03:57.870
As you see we have three client here.

03:57.910 --> 03:58.110
Okay.

03:58.150 --> 04:00.790
One of them is router and we have two more.

04:01.790 --> 04:05.110
And it is like this.

04:05.150 --> 04:05.590
Okay.

04:06.110 --> 04:08.470
So now we have this.

04:08.510 --> 04:15.710
And let's go for the next lecture to see what is going to be the coolest thing in the in the next lecture.
