Okay, now we don't need this line of code because these were just for showing more details.
Okay, now I don't need them.
Okay.
Now the this part.
Okay.
This part is complete.
And now it is time to send the broadcast.
Okay.
Send the broadcast.
So in Scapy we have a function called SRP.
Okay.
Send and receive packet or send and receive.
So here we are going to use that okay.
Let's use Scapy dot SRP.
And here we need to give the uh packet.
Okay.
It is ARP request and broadcast.
This is the packet that we want to send.
And while we send that packet here you will receive two things okay.
One answered.
Okay.
That is here.
And it is telling that I have this these.
And also when an answer.
And for example you will send this packet to this one.
And to this one the router will receive the packet that is not answered.
Okay.
From router that is not answered.
So we need to handle that as well.
So we are receiving to the thing here.
One of them is the answer.
So let's name it answered and and answer.
So now we have this both here and also we have one more thing.
And that is the timeout okay.
For example it will send the packet to the whole computers okay.
And it will wait for a lot of time.
So you need to give a timeout to this for example one second.
So for the first computer if it did not receive any answer it.
For example wait for one second and then go for the for the next client.
So if you don't give it so you will be back here.
I am going to give that timeout to one for example.
Okay.
And now let's print uh some of them.
For example we have answered summary.
Let's see what do we have here.
Okay.
Now you are seeing that finishing sending 256 packet.
Okay.
Which is, uh, sending for all computer and only receiving three packets.
Okay.
Got three answered.
And the whole thing that is not received, which is not which is unanswered.
Okay, 253 packets.
So here you see, we have either ARP who has it is saying it is telling that who has this IP address,
say this one, which is my computer.
Okay.
And it is telling me that the IP is at.
It's telling that I have this IP which is the router.
Okay.
And my Mac address is this one.
And also this one.
My Mac address is this one.
And also the other client.
Okay.
Telling that my IP is this one.
And I have this Mac address.
And here it is asking that who has this IP.
And the client is responding that I have this IP.
And in my Mac address is this one.
Okay.
So my computer is asking and it is sending for all the client.
As you see we have three client here.
Okay.
One of them is router and we have two more.
And it is like this.
Okay.
So now we have this.
And let's go for the next lecture to see what is going to be the coolest thing in the in the next lecture.