Now that you know what is a mac address and how to change it using a prebuilt program that is come that
already exists in Kali Linux, it is time to go and build your own program to change Mac address automatically.
So for creating this program we are going to use a module or library.
You know what is a library.
Okay.
Already you learn it in Python basic section and name of this library or module is a process.
This app process will allow you to run system command using Python.
It is very easy to use and very handy.
So there is its it is its library okay.
That its document that we can use it.
And here let me show you how you can use it okay.
First you need to import this app process.
And then you can use a process that run before it was subprocess dot that call function, but now it
is subprocess dot run function.
And then you can provide the command here okay.
Or like this or like this or like this multiple command.
And also this one shell is equal to true.
So it has a lot of information here.
You can come and continue learning it from here.
So now let's go here into the Mach ginger folder okay.
Create a mach ginger folder.
And then create a file by the name of Mach ginger.
Here we are going to create that program.
So before that maybe that library is not installed into your system.
So you could use pip install.
It is called SAP process.
Hit enter and wait just a moment to install it.
We could not find version satisfy required to process version none okay maybe.
Maybe it is already installed into my system.
Let me use python to go to Python interpreter.
Import that process and hit enter.
You see, I have no error.
That means it is already provided into my system.
Very good.
Now I can exit this Python interpreter using exit method.
Hit enter.
Clear this.
And now let's use that.
Okay so import app process.
Okay.
Now let's use this app process dot run function.
And here you need to give the command.
Okay.
The first command that was showing the Mac address.
Okay.
In Linux it was ifconfig.
And here use command right.
Shell is equal to true.
Now let's save this and execute this.
Maybe it is not going to let me to change that.
Okay.
Let's go, uh, out of this folder and then go to Mac Changer.
And then now let me use Python Mac changer and hit enter.
As you see it is.
Come on.
Now you see that it ran the command successfully.
And it is showing me the result that was for ifconfig.
Okay.
If config.
Now if I hit ifconfig again it's going to give me the result.
That is this one give okay.
So now you know how to run a system command using subprocess.
So let's go and improve this.
Learn how to create our application okay.
To change the Mac address for a system.