Okay so let's start developing this function.
We are being too received from our economic scene.
So to do this we have to decode the
decoder.
That's to go to what you decoder.
And then we have to provide connection.
So now since we have the widest connection and we want to use this valuable to stored content what trust
we need to create the same files deck we created in our other lecture.
So what I'm going to do is I'm going to the Linux machine and I'm just going to copy this.
So you don't have to do in
and then I'm going to the Windows machine and I'm going to paste it here.
So now we have a stop the next thing I need to do is I need to create an empty struct.
So I'm going to make efforts it goes to and I start.
So now I have an empty struct the next step is to use this decoder to read data into this struct.
So what I can do is I can call decoder to decode and then I have to provide the file struct which is
the MP for the struct then.
If there is some uh.
So this will help us in decoding on the file contents into these fields or objects.
So once we have this the next step is to create an empty file on the system and copy these file content
into this empty file that we will create.
So to do this we can use or start the matter method which will create an empty file depending on the
name of depending on the fight.
So so f start file name so we provide the filing many to create an empty file on our system.
The next step is to check if the file has been created properly or not.
So it's going to be done at a and an object
so let's check for the other condition if it is not equal to men computer.
And then then we can say that I'm equal to it right
okay.
If the file is created successfully our next goal would be to use this file object to write to this
file.
So before we do this we can use therefore find that laws to make sure that the file is closed properly
yet then and then we have to simply write out this find out contained this thing so I can use fine dot
right that third and then I can write a first for you on time.
This will return a number of bytes written and added so and then I can print if uh is a lot to be done
then we can print out that.
And then
unable to write Freud's
as you do it and then you can't change that number of wait.
And then two points.
Once we have this finally turns over next step would be to check if the file has been written properly
or not.
So we can use the same file exists function that we used previously.
So let's uh.
Okay.
So before going that let's create a variable called status.
So this and then let's see if the file has been written properly or not.
So now here I will use same jacket file existence method that we developed in our supplement program.
So I'm going to the new machine and then I'm simply going to copy this function
and then I'm going through the windows machine and then I'm going to paste it.
So check this out so I can see that if check existence and then the fine may exist what we can do is
we can say that status equals to successfully
when we can find or else if this if we are unable to write this file properly we can say that status
equals two and you will be right.
Why do we the
and then we can simply send this data as to whether I get a server.
So we can use the connection that right object connection that right to send the status and before sending
this data so we will append backslash and should we have type like
this.
So I added back selection so that it so we can do it properly on our victim machine is not what happened
machine.
So now everything is complete here in next lecture we will just feed this status on our hacker machine.
And then that's it.