Welcome back everyone.
In this section we are going to build a program that will execute all these commands.
So in order to use this program we can simply do is we have already created a function that executes
commands and gives effective results.
So what we can do is we can just copy this function and paste it here.
So I've done nothing else.
Just copy this function and pasted it here so.
So now since these commands require a route privilege so we have to provide password.
So we need some way to interact with the command line in order to do this.
Well we have declared the standard output any errors we can also declare standard input here so we can
say a standard input is equal to start standard input
and then we can simply used on these commands by calling this function so we can say execute.
Come on.
And now the first command should be pseudo because we want to run these commands as a rule to use it.
So we have to provide to do as the first argument and then the last of the next arguments would be the
arguments for these commands.
So we can simply declare a new variable have a string theory and the first one would be I have config
IPH done so we can I have config Gates zero and then down and then similarly we can type these as well
so I'm just going to duplicate it by pressing control D and head I can change it.
So this should be SJW.
And the next argument should be eater and the last argument should be the new mac address.
So I'm just going to copy this one and pasted here.
All right.
So and at the end we have to re enable this interface so we can write zero and up.
So now we have completely implemented this program which will take down the interface shut down the
interface and then it will change the hardware.
Our Mac will use and at the end of it will restart the system so we can simply run this command so we
can say Go on B to and since I've already done it.
So I've already provided the password here so I ran this program once before.
So but for you this will ask for passwords so provide the password here and it will execute this program
and once it is executed you can simply write pseudo config and provide the password and now you can
see that the ether field has changed so previously it was something else but now it is this new layer
which is the value that we just declared.
So in this way you can lost this MAC address of the device.
So let's stop here and then next lecture will proceed for the.