WEBVTT

00:00.680 --> 00:07.280
Okay, now it is time to go and create this application or improve this application and make it a little

00:07.280 --> 00:08.280
more secure.

00:08.320 --> 00:16.200
Okay, so here we have in the documentation we have subprocess dot run and we can use a list here.

00:16.240 --> 00:16.720
Okay.

00:16.760 --> 00:20.680
And then we can separate each command by command.

00:20.720 --> 00:21.640
Okay.

00:21.680 --> 00:26.080
So not like these that we use all in one line.

00:26.120 --> 00:26.400
Okay.

00:26.440 --> 00:31.240
We can use each command as an element of a list.

00:31.280 --> 00:32.920
It is more secure.

00:32.960 --> 00:34.400
So let's jump right in here.

00:34.560 --> 00:34.960
Okay.

00:36.200 --> 00:39.680
Uh, here you see we have we are using interface.

00:39.720 --> 00:40.120
Okay.

00:41.920 --> 00:42.880
Interface.

00:42.880 --> 00:52.600
And also if config and also interface and also down all this stuff has one element.

00:52.760 --> 00:53.160
Okay.

00:54.200 --> 00:56.960
Now let's go and change it okay.

00:57.640 --> 01:00.040
We could change it to something like this.

01:00.040 --> 01:01.680
Let me remove this part.

01:01.720 --> 01:02.120
Okay.

01:02.630 --> 01:04.910
Now I'm going to change it to a list.

01:06.990 --> 01:09.630
And I'm writing here.

01:10.710 --> 01:11.190
Okay.

01:11.590 --> 01:13.790
Now it is changed to a list.

01:13.790 --> 01:19.190
But I have to change this to an element.

01:19.230 --> 01:20.030
Okay.

01:20.030 --> 01:22.390
So we don't need this plus icon here.

01:22.430 --> 01:23.230
Okay.

01:23.230 --> 01:23.870
That is it.

01:23.910 --> 01:24.750
And also.

01:27.550 --> 01:28.310
This one.

01:28.550 --> 01:31.190
And also where was the other one.

01:31.230 --> 01:31.510
Okay.

01:31.510 --> 01:37.830
Let's put it here and put it here so later we can remove it okay.

01:38.070 --> 01:38.310
Now.

01:43.870 --> 01:44.870
Or not like this.

01:44.870 --> 01:46.390
Let me change it in another way.

01:46.430 --> 01:46.830
Okay.

01:47.830 --> 01:50.150
How can I select multiple line okay.

01:50.190 --> 01:56.750
I keep or I press alt key and then I click here and then click here.

01:57.070 --> 01:59.230
Now I get this one.

02:00.550 --> 02:01.870
Okay now I have it.

02:03.230 --> 02:04.350
And again here.

02:06.790 --> 02:09.430
Okay, now.

02:09.470 --> 02:10.190
Very good.

02:10.350 --> 02:13.950
Now, it's better to remove this part again from here.

02:14.470 --> 02:16.350
And also from here.

02:18.110 --> 02:18.510
Okay.

02:19.390 --> 02:22.190
So use a camera here.

02:23.230 --> 02:25.030
And also from here.

02:27.150 --> 02:27.910
Right in here.

02:29.710 --> 02:29.910
Okay.

02:29.910 --> 02:31.350
There is the other one that is here.

02:31.390 --> 02:31.870
Okay.

02:39.750 --> 02:40.710
Okay.

02:40.710 --> 02:41.350
Perfect.

02:41.510 --> 02:42.750
Now let me save it.

02:42.950 --> 02:43.750
Okay.

02:43.790 --> 02:46.870
I think there is no more thing.

02:47.110 --> 02:55.670
Okay, let's go and use a clear command here and re-execute the program.

02:59.390 --> 02:59.990
Okay.

03:00.150 --> 03:01.830
We have an error here.

03:01.870 --> 03:02.710
What is that?

03:05.630 --> 03:08.420
I think I haven't used a camera here.

03:08.580 --> 03:10.060
On which line?

03:10.060 --> 03:10.780
Line six.

03:11.900 --> 03:14.180
That is here and here.

03:15.820 --> 03:16.580
Very good.

03:16.700 --> 03:19.860
Now save it again and go back here and hit enter.

03:20.060 --> 03:21.100
So what is the interface?

03:21.140 --> 03:32.420
It is ETH zero and the Mac address is going to be 001122 and three three and four four again.

03:32.460 --> 03:33.460
Let's go with four four.

03:33.500 --> 03:34.540
Hit enter.

03:34.580 --> 03:36.660
It says Mac and change.

03:36.700 --> 03:37.420
Okay.

03:39.420 --> 03:43.780
With no such file or directory.

03:43.940 --> 03:46.540
If on tick.

03:47.700 --> 03:50.180
Why is this file not found?

03:50.940 --> 03:51.860
What does that mean?

03:55.820 --> 03:59.900
Okay, Mac, change line seven in module.

03:59.940 --> 04:00.820
Okay.

04:02.740 --> 04:05.340
Ifconfig interface down.

04:06.660 --> 04:07.020
Okay.

04:07.020 --> 04:08.420
We have a lot of space here.

04:08.420 --> 04:09.730
Let me go and.

04:12.810 --> 04:13.410
Fix this.

04:13.410 --> 04:13.770
Okay.

04:14.450 --> 04:16.530
Let me remove these spaces from here.

04:18.010 --> 04:18.810
And also.

04:23.970 --> 04:26.370
I think we don't need these spaces anymore.

04:33.130 --> 04:33.610
Okay.

04:33.650 --> 04:36.490
Also here, you see, we have another thing.

04:36.530 --> 04:36.930
Okay.

04:37.730 --> 04:42.450
And this both it is two command and I use them as one command.

04:42.890 --> 04:44.610
Maybe this is the problem.

04:44.650 --> 04:45.290
Okay.

04:45.330 --> 04:48.250
Let's handle that as well okay.

04:48.290 --> 04:50.330
Use a separator.

04:51.490 --> 04:52.330
Separate them okay.

04:52.330 --> 04:53.810
Now it looks good.

04:53.850 --> 04:55.810
Let's go and execute this again okay.

04:55.850 --> 04:59.730
Here you learn how to handle some error okay.

04:59.770 --> 05:01.530
Both zero.

05:01.930 --> 05:03.210
And what is the Mac address.

05:03.250 --> 05:09.530
It is zero zero again 0011223344.

05:10.290 --> 05:11.410
And again, four four.

05:11.450 --> 05:12.050
Hit enter.

05:12.330 --> 05:14.490
Now there is no problem, I think.

05:14.810 --> 05:16.250
And it is changed.

05:16.290 --> 05:16.930
Very good.

05:16.970 --> 05:18.090
Let's use ifconfig.

05:19.130 --> 05:20.890
Now it is changed to this this thing.

05:20.930 --> 05:21.770
Okay.

05:21.810 --> 05:23.290
Let's use clear.

05:23.290 --> 05:25.530
And this time let's hijack this.

05:28.450 --> 05:31.650
Okay I'm going to give the eth0.

05:32.530 --> 05:33.290
Okay.

05:33.290 --> 05:36.730
And then I'm going to use for example LSE.

05:39.130 --> 05:40.650
And then hit enter.

05:40.650 --> 05:41.530
Which one.

05:41.530 --> 05:41.890
Okay.

05:42.890 --> 05:44.090
Something and hit enter.

05:44.530 --> 05:45.570
Now you see that.

05:48.130 --> 05:52.490
Error while getting interface like no such devices.

05:52.530 --> 05:53.250
Okay.

05:53.290 --> 05:57.690
Now you see that it it is checking this only as one command.

05:57.730 --> 05:59.810
It is not using this okay.

05:59.850 --> 06:01.650
As a separate command.

06:02.010 --> 06:08.610
Now here you learn how to solve this hijacking problem.

06:08.650 --> 06:10.010
Very good.

06:10.050 --> 06:10.890
Let's go and see.

06:11.010 --> 06:12.970
How can we improve this a little more?
