Okay so let's move the Windows machine and now we are going to do the command that we sent from our
satellite.
Let's create the connection do that.
Come on to the
input output.
We did it then.
I'm going to give it that connection as the input since we want to read from that connection.
The next step is to read this string.
So I'm going to call the read the string and then the way to reach is speculation and then I'm going
to install it and use it.
Come on.
And then check for the uh different data.
Can you turn them over to me.
Come on.
If we are properly able to it.
Come on.
The next step is to clean the backslash and from this Come on.
I'm going to use strings on trims affects the user.
Come on.
Then I'm going to a little backslash and then I'm going to install it and use it.
Use it.
Come on do you.
So now I have the user.
Come on.
Since this user command is off the farm like this for example see the space station could see the space
and then for example the move up or down led to want to move back which is 2D space the world.
So this go on.
Help us in moving one step up in there.
How do we need to split this into this thing and this thing.
So the first thing will be the command.
And the second thing would be the directory that we want to move let's call it the strings since it
is in the form of strings.
I'm going to call it strings dark dream.
I'm not late so I'm going to split this.
You choose a command on the basis of space.
So what this function will do is that it will do it on an array and it will divide this thing the base
on the separator.
So in our case the first element should be the command that we want to use of the string.
And the second element should be the separator.
So in this case our the separator is space.
So it will divide this string into an array of strings and these array will contain two elements.
The first element would be shooting in the second element would be the about.
So it would be something like this C
C D.
And then the second element would be a and then I'm going to store this as you use.
Come on Daddy.
Once we have that.
So the first element is you D.
And this is the directory that we want to move.
So I'm going to call and directory to move equals.
And then I'm going to use this array and the first element I disagree.
So I'm going to store this element in this very well and next step is simply to move this directory.
But one thing we need to keep in mind that we need to check if this directory exist or not for example
if Daddy does it just in 2D and there is no second element we we cannot proceed for that.
So we need to check if the length of this array is more than 1.
So I'm going to check if land of use the one there is greater than one.
Then I'm going to guard this and put it here so it doesn't cause an out of index header.
Once we have this data to the next step is simply to change that that it will move the directly.
So in order to move the directory we have to use voice dots Gene directory method and then the directory
that we want to move.
So this oyster Gene had a tree function Jane's got an location of the program.
So and this if they cannot do we it returns an error then let's put a check for an error if it is not
equal.
And then we can say that unable to
when they want to change the
my lips move here.
And then what we want to do next is to get the present working directory again to know that these directory
and this directory are different.
So I'm going to get the present looking directory again by using voice that get working directory function.
So this is our updated new present working directory.
And then what we want to do is we want to send this present working directory back to the hacker so
the haircut knows that our command has worked properly.
So let's use the connection.
Right
right.
And then I'm going to send this president working directly but note that this trends and working directory
must also contain the backslash and character so we can do this properly on our victim
and then the number of whites.
And then we can print the statement that
is the w e.
We tend to use the.
And then the number of whites or by.
Okay.
So now we have everything set up of changing the directory getting the user input changing the directory
according to the user input and then we are getting the president working are creating and then sending
this back to the hacker.
So let's proceed for the next lecture.