Okay, now it is time to go and create this application or improve this application and make it a little
more secure.
Okay, so here we have in the documentation we have subprocess dot run and we can use a list here.
Okay.
And then we can separate each command by command.
Okay.
So not like these that we use all in one line.
Okay.
We can use each command as an element of a list.
It is more secure.
So let's jump right in here.
Okay.
Uh, here you see we have we are using interface.
Okay.
Interface.
And also if config and also interface and also down all this stuff has one element.
Okay.
Now let's go and change it okay.
We could change it to something like this.
Let me remove this part.
Okay.
Now I'm going to change it to a list.
And I'm writing here.
Okay.
Now it is changed to a list.
But I have to change this to an element.
Okay.
So we don't need this plus icon here.
Okay.
That is it.
And also.
This one.
And also where was the other one.
Okay.
Let's put it here and put it here so later we can remove it okay.
Now.
Or not like this.
Let me change it in another way.
Okay.
How can I select multiple line okay.
I keep or I press alt key and then I click here and then click here.
Now I get this one.
Okay now I have it.
And again here.
Okay, now.
Very good.
Now, it's better to remove this part again from here.
And also from here.
Okay.
So use a camera here.
And also from here.
Right in here.
Okay.
There is the other one that is here.
Okay.
Perfect.
Now let me save it.
Okay.
I think there is no more thing.
Okay, let's go and use a clear command here and re-execute the program.
Okay.
We have an error here.
What is that?
I think I haven't used a camera here.
On which line?
Line six.
That is here and here.
Very good.
Now save it again and go back here and hit enter.
So what is the interface?
It is ETH zero and the Mac address is going to be 001122 and three three and four four again.
Let's go with four four.
Hit enter.
It says Mac and change.
Okay.
With no such file or directory.
If on tick.
Why is this file not found?
What does that mean?
Okay, Mac, change line seven in module.
Okay.
Ifconfig interface down.
Okay.
We have a lot of space here.
Let me go and.
Fix this.
Okay.
Let me remove these spaces from here.
And also.
I think we don't need these spaces anymore.
Okay.
Also here, you see, we have another thing.
Okay.
And this both it is two command and I use them as one command.
Maybe this is the problem.
Okay.
Let's handle that as well okay.
Use a separator.
Separate them okay.
Now it looks good.
Let's go and execute this again okay.
Here you learn how to handle some error okay.
Both zero.
And what is the Mac address.
It is zero zero again 0011223344.
And again, four four.
Hit enter.
Now there is no problem, I think.
And it is changed.
Very good.
Let's use ifconfig.
Now it is changed to this this thing.
Okay.
Let's use clear.
And this time let's hijack this.
Okay I'm going to give the eth0.
Okay.
And then I'm going to use for example LSE.
And then hit enter.
Which one.
Okay.
Something and hit enter.
Now you see that.
Error while getting interface like no such devices.
Okay.
Now you see that it it is checking this only as one command.
It is not using this okay.
As a separate command.
Now here you learn how to solve this hijacking problem.
Very good.
Let's go and see.
How can we improve this a little more?