Okay, now let's complete this program.
Okay.
Let's use the spool function.
Okay.
So let's call it spool function here.
First we need to provide the target IP and then the spool IP.
So the target is going to be our Windows 7.
Okay.
It is ten 0 to 15 I think.
And also we have the router which is ten 021.
Okay.
Now if I execute this and let's see what do we have here.
And you see right now it's only doing the job which is uh sending only one packet.
And that is uh, sending that for Windows 7 and not for router.
So here if I use the ARP dash A again, you see that it is for, uh, it is changing the Mac address.
Okay.
If I try it again.
Okay.
It's the same.
And now if I, uh, go back.
Okay.
It's doing only one time.
And if in some time, for example, ten second passed, or I browse something on internet, and then
I.
If I come back.
So it is again the connection is lost.
And I sent only one packet.
Okay.
So we need to do this continuously and send a lot of packets.
And not just for this one since this for both of them.
Okay.
So now first the target is Windows 7.
Now I'm going to call this again.
And this time the target is going to be the router.
So let's use the spoof again.
This time is going to be ten 0 to 1.
And the source is going to be.
Ten zero 215 which is Windows 7.
Now if I.
Uh, let's come back to Windows 7 once again and let's See?
Still the same.
Okay, kids, let's go to internet.
And if you have internet connection, looks like we have something.
Okay.
For example, I am going to go to Bing.com and doing something, browsing stuff like that here.
And you see that it is changed back.
The Mac address is changed to what it was.
Okay.
Now I want to execute the program.
Okay.
This time it sends two packets one packet for Windows 7 and also one packet for router.
Again, if I come back to Windows 7 and this time again if I check it, uh, it is not changed.
Okay.
No problem.
Let me use CLS again.
Sending two packets, one for router and one for Windows 7.
So now you see that it has changed.
The IP address is changed.
Now if I again browse something on internet, it will be changed back to the real Mac address.
So it is not what we want.
Okay.
The thing we want is to be continued.
Okay.
For example, do this task for at least 10s or at least until we want.
Okay.
Uh, so if you want to do that to if you want this program to be ran or to be executed for a while,
you need to use a for loop or while loop or something like that.
So here I'm going to use while and give a condition, which is true while it is true.
Uh, I need this to be executed.
Okay.
And also I want this to be, uh, for example, pause for at least two seconds and then send another
packet.
So to do that I need to use time dot sleep at least two seconds.
So here I haven't imported the time I need to do that.
Import pi.
Okay, now save this.
Let's go back here.
And now first it sends two packet.
Okay.
Again after two seconds it sends two other packet to other packet.
It is good, but not very efficient.
Okay.
Uh, we need to change this program, that we will do that in the future.
Now let's go back here.
And now, if I browse this again, you see that it is not changed.
I can I try to go to bing.com or google.com.
If again I try to See it has not changed.
Okay.
And also you see that I cannot access the web page.
That is because I need to enable the port forwarding on Kali Linux once again.
Okay.
You know how to enable the port forwarding on your machine.
Okay.
Echo one to something like that.
Let me.
Uh, split this horizontally here.
You just need to use sudo is you.
Let's use echo IP forwarding.
Now it is enabled.
And now if I come here and try to access this, you see that it is accessed.
And here if I try to access this one, you see that it is not changed back to what it was.
And you see that still it is sending two, two packets.
Let's cancel this.
And that is it.
If I come back to Windows 7 here, you see, it is still what it was.
And if I can try to access the internet, for example, I want to see some picture, animal picture
or anything.
Okay.
There is still that.
That is what it was.
And it is how it works.
Okay.
As you see, the program is not very efficient because it is showing me send one packets and one packet
a lot in one terminal.
So I need to fix this.
I need to update this in a way that it only updates the number.
For example, send one packet, send two packets and three packets, send 100 packets like that.
And also after my task is finished, I need to have an option to cancel this.
Okay.
And that is it.
Okay.
Let's go and see how we can improve this program.