WEBVTT

00:00.920 --> 00:08.240
Now that you know what is a mac address and how to change it using a prebuilt program that is come that

00:08.240 --> 00:19.080
already exists in Kali Linux, it is time to go and build your own program to change Mac address automatically.

00:19.480 --> 00:24.640
So for creating this program we are going to use a module or library.

00:25.000 --> 00:27.680
You know what is a library.

00:27.720 --> 00:28.080
Okay.

00:28.120 --> 00:36.240
Already you learn it in Python basic section and name of this library or module is a process.

00:36.480 --> 00:44.680
This app process will allow you to run system command using Python.

00:44.720 --> 00:48.160
It is very easy to use and very handy.

00:48.520 --> 00:53.360
So there is its it is its library okay.

00:53.400 --> 00:55.880
That its document that we can use it.

00:56.520 --> 01:00.280
And here let me show you how you can use it okay.

01:00.320 --> 01:02.280
First you need to import this app process.

01:02.280 --> 01:08.490
And then you can use a process that run before it was subprocess dot that call function, but now it

01:08.490 --> 01:10.250
is subprocess dot run function.

01:11.330 --> 01:15.250
And then you can provide the command here okay.

01:15.290 --> 01:19.650
Or like this or like this or like this multiple command.

01:19.650 --> 01:23.210
And also this one shell is equal to true.

01:23.210 --> 01:25.770
So it has a lot of information here.

01:25.770 --> 01:29.890
You can come and continue learning it from here.

01:32.690 --> 01:37.810
So now let's go here into the Mach ginger folder okay.

01:37.850 --> 01:39.650
Create a mach ginger folder.

01:39.650 --> 01:42.090
And then create a file by the name of Mach ginger.

01:42.090 --> 01:45.210
Here we are going to create that program.

01:45.210 --> 01:50.330
So before that maybe that library is not installed into your system.

01:50.330 --> 01:53.130
So you could use pip install.

01:53.970 --> 01:57.170
It is called SAP process.

01:57.850 --> 02:03.130
Hit enter and wait just a moment to install it.

02:03.170 --> 02:10.450
We could not find version satisfy required to process version none okay maybe.

02:12.570 --> 02:16.340
Maybe it is already installed into my system.

02:16.580 --> 02:20.820
Let me use python to go to Python interpreter.

02:21.420 --> 02:26.340
Import that process and hit enter.

02:27.900 --> 02:30.860
You see, I have no error.

02:31.060 --> 02:35.940
That means it is already provided into my system.

02:35.980 --> 02:36.780
Very good.

02:37.180 --> 02:42.580
Now I can exit this Python interpreter using exit method.

02:45.180 --> 02:46.380
Hit enter.

02:46.420 --> 02:47.140
Clear this.

02:47.340 --> 02:49.700
And now let's use that.

02:49.740 --> 02:54.660
Okay so import app process.

02:55.460 --> 02:55.860
Okay.

02:56.340 --> 03:00.460
Now let's use this app process dot run function.

03:00.780 --> 03:03.420
And here you need to give the command.

03:03.460 --> 03:03.980
Okay.

03:04.020 --> 03:07.980
The first command that was showing the Mac address.

03:08.020 --> 03:08.300
Okay.

03:08.300 --> 03:11.180
In Linux it was ifconfig.

03:11.860 --> 03:14.020
And here use command right.

03:14.060 --> 03:17.380
Shell is equal to true.

03:17.460 --> 03:19.940
Now let's save this and execute this.

03:21.460 --> 03:25.380
Maybe it is not going to let me to change that.

03:25.540 --> 03:25.820
Okay.

03:25.820 --> 03:33.780
Let's go, uh, out of this folder and then go to Mac Changer.

03:34.340 --> 03:40.380
And then now let me use Python Mac changer and hit enter.

03:40.940 --> 03:43.060
As you see it is.

03:45.860 --> 03:46.460
Come on.

03:49.740 --> 03:53.540
Now you see that it ran the command successfully.

03:53.860 --> 04:01.140
And it is showing me the result that was for ifconfig.

04:01.340 --> 04:01.740
Okay.

04:01.780 --> 04:03.420
If config.

04:03.460 --> 04:07.180
Now if I hit ifconfig again it's going to give me the result.

04:07.380 --> 04:09.740
That is this one give okay.

04:10.420 --> 04:16.460
So now you know how to run a system command using subprocess.

04:16.460 --> 04:18.460
So let's go and improve this.

04:18.500 --> 04:23.100
Learn how to create our application okay.

04:23.140 --> 04:26.060
To change the Mac address for a system.
