WEBVTT

00:01.320 --> 00:06.160
Now, you may think that the program is completed, but I have to tell you that it is not completed.

00:06.160 --> 00:08.960
Still, there is things, ways that we can improve it.

00:09.800 --> 00:11.440
How to see.

00:11.480 --> 00:18.120
Here we are having the interface and also the Mac address inside the script, inside the program.

00:18.120 --> 00:26.560
Whenever a user want to change a mac address to a mac address or change the interface, they need to

00:26.560 --> 00:29.120
open the program, it is not very good.

00:29.120 --> 00:32.480
Okay, so how can we fix this?

00:32.480 --> 00:37.240
It is better to ask the user to enter interface and enter the Mac address.

00:37.760 --> 00:42.240
So interface is equal to input and list.

00:42.920 --> 00:45.840
And here ask for interface okay.

00:48.400 --> 00:49.800
This is going to be the interface.

00:49.800 --> 00:53.600
And this port it is going to be the Mac address.

00:53.840 --> 00:58.360
So input and let's say new Mac.

00:59.960 --> 01:07.560
And now it is I think better let's go for this and execute this.

01:10.450 --> 01:10.890
Okay.

01:10.890 --> 01:13.490
What is the interface you want to change?

01:13.730 --> 01:15.850
It is ETH zero.

01:16.250 --> 01:17.730
And what is the new Mac address?

01:17.730 --> 01:20.650
0011 okay.

01:20.690 --> 01:21.410
One one.

01:22.770 --> 01:23.250
Sorry.

01:24.890 --> 01:28.010
Interface is ETH zero.

01:28.050 --> 01:40.450
Hit enter now 1100 okay 2233 and four four and five five hit enter.

01:40.890 --> 01:47.130
Now you see that changing Mac address to this one okay.

01:47.170 --> 01:48.890
Cannot assign request address.

01:48.890 --> 01:49.690
No problem.

01:49.930 --> 01:55.370
Now let's use ifconfig and see if it is changed or not okay.

01:56.490 --> 02:00.570
And here you see that it is not changed.

02:01.170 --> 02:03.210
Let's come back here okay.

02:03.890 --> 02:06.010
And see why it is not changed.

02:12.650 --> 02:13.010
Okay.

02:13.050 --> 02:15.290
It looks it is Okay.

02:15.330 --> 02:16.890
It has no error here.

02:17.530 --> 02:18.850
We have no problem.

02:19.170 --> 02:21.290
Let's go and execute that again.

02:21.770 --> 02:24.610
Let's see what is problem.

02:24.650 --> 02:24.930
Okay.

02:24.930 --> 02:28.890
Let me clear this for not clear.

02:30.330 --> 02:30.770
Okay.

02:30.770 --> 02:32.250
We have eth0.

02:32.370 --> 02:32.730
Okay.

02:33.130 --> 02:36.090
So now you see that this is the Mac address okay.

02:36.930 --> 02:39.050
And zero zero okay.

02:39.370 --> 02:45.410
112233 and four four.

02:45.450 --> 02:48.490
This time again I'm going to change it back to five five.

02:48.530 --> 02:49.130
Hit enter.

02:49.890 --> 02:55.210
And you see that it is changing Mac address for eth0 to this Mac address.

02:55.250 --> 02:58.250
It is what we executed or it is what we give.

02:58.290 --> 02:59.370
Okay.

02:59.410 --> 03:04.410
And now if I use ifconfig you see that it is changed okay.

03:04.450 --> 03:06.290
I don't know what was the problem.

03:06.330 --> 03:08.170
Cannot assign requested address.

03:08.210 --> 03:09.010
Oh my God.

03:09.050 --> 03:14.130
It is something that I give is the problem with problem is with giving.

03:14.130 --> 03:17.210
This Mac address is not something that we can assign.

03:17.250 --> 03:17.650
Okay.

03:18.690 --> 03:21.130
And here we used.

03:21.130 --> 03:21.420
Um.

03:23.740 --> 03:25.060
Input function okay.

03:26.340 --> 03:34.020
To ask the user to enter interface and new Mac address, and then we can use it that there is still

03:34.020 --> 03:34.900
a problem.

03:34.940 --> 03:35.340
Okay.

03:35.540 --> 03:36.540
Let me show you.

03:39.180 --> 03:39.580
Now.

03:43.660 --> 03:44.020
Okay.

03:44.500 --> 03:47.860
The user it is asking the user to enter the interface.

03:47.980 --> 03:53.300
He is entering the ETH zero and then this semicolon.

03:53.300 --> 03:55.980
And then for example LSE again semicolon.

03:55.980 --> 03:59.780
And then hit enter new Mac address something okay.

04:00.740 --> 04:08.140
And you see here we have changing Mac address to this.

04:08.260 --> 04:10.340
And then we have eth0.

04:11.060 --> 04:14.620
And again we have ETH zero okay.

04:14.620 --> 04:16.980
We have Mac changer dot pi.

04:17.580 --> 04:20.380
And then this thing not found.

04:20.380 --> 04:22.740
And then we have three times this one.

04:22.740 --> 04:23.980
Why is that.

04:25.500 --> 04:25.980
Okay.

04:25.980 --> 04:26.580
Come on.

04:29.220 --> 04:30.460
And what is that?

04:30.940 --> 04:31.700
What happened?

04:32.540 --> 04:34.620
It is called hijacking.

04:34.620 --> 04:35.020
Okay.

04:35.900 --> 04:38.780
In programming language, it is called hijacking.

04:39.220 --> 04:41.820
While we use this semicolon.

04:41.860 --> 04:42.100
Okay.

04:42.140 --> 04:48.100
And then use another command that means first it will execute this one and then it will execute this

04:48.100 --> 04:48.500
one.

04:48.500 --> 04:49.620
So it is one problem.

04:49.620 --> 04:50.980
One big problem.

04:50.980 --> 04:58.980
Whenever the user is going to use our program, he could hijack your program and use and execute another

04:58.980 --> 05:00.980
command beside what we give.

05:00.980 --> 05:03.060
So we need to solve this problem okay.

05:03.060 --> 05:10.620
We can solve it very easily by just uh, by just adding here, okay.

05:11.420 --> 05:14.620
Not just giving all this as a string, okay.

05:16.020 --> 05:18.380
By giving them into a list.

05:18.420 --> 05:18.860
Okay.

05:19.260 --> 05:20.900
By putting them into a list.

05:21.180 --> 05:28.500
So while the user is checking, it will come and check if a thing that the user enter if that exists

05:28.540 --> 05:30.300
in a list, so it will execute.

05:30.300 --> 05:33.060
If not then it will not be executed.

05:33.180 --> 05:35.620
So let's go and see that in the next lecture.
