Okay, now the program this part creating a packet is completed.
And this two method is showing the details about packet that we are trying to send.
Now instead of just showing the details about packet it is time to send the packet.
Okay so we need to use the send method.
Okay.
We have Scapy that send and give the packet.
Okay.
Now this will send the packet.
Okay.
So let's go to Document Python project for ethical hacking.
And then we have.
Uh network scanner I think or ARP spoofing.
Okay.
It's ARP spoofing.
Okay.
Pseudo ARP spoofing ARP spoof.
Okay.
Sudo python setup.py.
Hit enter.
Provide the best one.
And you see now that one packet sent.
Okay.
So now if I come back here.
And go to cmd arp dash a.
Now you see that instead of having a mac address for router, I only have Mac address of my computer
for router.
Okay so it is not what it really is okay.
There is some fake information.
Okay.
That is good.
Now there is another thing that we need to do.
Okay.
And that is to actually this one is only doing a one part of the job.
How?
Right now we're just sending the packet to this one.
To this one to.
Computer.
But not for the router.
So the thing we need to do is create a method or a function to get the Mac address.
Okay.
Mac address.
And also to create another function for doing this, uh, task here in Mac changer I think.
Let's see.
We had a method by the name of scan.
Get current.
Mac.
Let me go to here.
Okay.
We have a method called scan here.
We are going to use this method.
Okay.
I will copy this method and I will just paste it here.
Now I will change this to something like let's use git underscore mac.
Okay.
So right now it is asking for IP.
That is okay here.
And the ARP request CPLP.
It is.
Let this be like this.
And also this three line.
Let them be the way that is okay.
Now here instead of having client list blah blah blah we need to remove this all from here.
And here I need to have.
Okay.
We have the answer here.
Okay.
Now we just need to return something from here.
Okay.
Let's use return answer, which is a list okay.
So I want to return this answer the first one.
Okay.
Dot.
Um h w is AAC audio Hardware source or a mac.
Mac address for the router.
Okay.
So this will return that.
And also I need to create another function.
Okay.
This is the function that we are just going to be using them.
Okay.
We already created this.
So you know how to create that method.
Okay.
And use it here.
We just use it.
And here I need to create another method called spoof.
Okay.
Uh here we need to give the target IP and also the spoof IP.
Okay.
So let's use target underscore IP a variable or a argument an argument and also spoof IP okay here.
Right here.
Let's um first we need to get the Mac address.
So I'm going to use target Mac.
It is equal to get Mac and let's provide the IP.
The IP is going to be the target IP.
Okay.
We give the target IP and we get its Mac address, and we save or restore it into the target Mac address.
So also we have.
Okay.
We do need to create anything else.
We just use that here.
Okay.
Now we have this.
Okay.
And here I can call the method which is called get um.
Get Mac here.
We need to provide the IP for what we want okay.
0 to 1.
This is the IP address for our source.
Okay.
And also as you see we have a lot of things here that is not that is provided okay.
Inside The function.
So we need to get them from outside.
As you see we have the target IP here.
Okay.
So we can use it here instead of providing them here.
So let's use target IP.
Okay.
And also we have this one which is the target Mac.
As you see we have the target Mac here.
So now I can use that here.
And also we have the source IP address or spoof IP.
Now I can use that here.
And.
So IP.
Okay.
Now the program is almost completed and we yet we haven't used the spoof function.
Okay.
So almost completed.
So let's go.
And in the next lecture complete this program.