Now that we know how to write, or how to use a process to change or to use system command.
Now it is time to go and write a simple program that change our Mac address.
Okay, so here you see we use ifconfig okay.
So here are beside this I can use the whole thing here okay.
And let me here okay.
In the terminal I clear this and use ifconfig.
Hit enter.
Now let me show you that the interface name is eth0 okay.
And this is the Mac address okay.
Either this is the Mac address right now.
And let's go write a program to change this okay.
So right here we have ifconfig and then a name of the interface which is eth0 okay.
And then down right now I want to uh turn off this Uh, interface.
Okay.
And then I copy this line of code.
Okay.
Go to the next line and write eth0.
And h w.
Okay.
Header and a new Mac address.
That is going to be 0011 and 223344.
And finally five five.
So make sure that it is, uh, 12 character.
Not more than that.
Okay.
Again use control C, control V and remove this this part.
Okay.
And the last thing is to turn it back on.
Now save this.
Okay.
Right now you see that this is the Mac address for Kali Linux.
Let's go and run this again.
Okay.
Mac changer.
Let's use super user privilege.
Hit enter.
Kali.
Probably.
And nothing happened.
That means it is maybe changed.
Okay, now let's use ifconfig.
Okay.
Let's scroll this and see that if it is changed or not okay.
You see we have this interface.
It is either okay.
And you see that the Mac address for this interface got changed.
Okay.
So perfect here.
You just learn you saw how to change this okay.
How to change the Mac address okay.
You write your simple program that change the Mac address to anything you provide here.
It is not the final part okay.
We are going to learn a lot of things.
We are going to improve this application okay.
We're going to use a functions to separate this and ask the user to enter for example eth0 interface
and also the Mac address.
And we are going to do a lot of things in this package.
So I'll see you in the next lecture.