 Hey everyone and welcome back to another Python tutorial. In this video I'm just going to be carrying on the Python program which we started before, so the backdoor program which we created. So we're going to progress on to carrying on the backdoor program by creating features like removing files, removing directory, sending files and creating directories. First of all I'd like to apologize for the delay in this video. I know it's been quite delayed. I've just been away from YouTube for some time but in the meanwhile thank you so much for all the support you guys have been showing. Anyway without further ado let's begin. So what we want to do while removing files is we want to use the OS module that we were using before. So first of all we need to send the command over to the slave program. To do that what we want to do is go over and initialize another command. So we do lf command equals, I'm going to call this to remove file. So that's the command name and then we're going to do connection.send command.encode. So what that does is it was going to send the command over to the slave program. So now here we also have to add another line so we recognize the command. So we're going to do lf command equals remove file. We're going to do so and so down there. So when we want to remove a certain file what we want to do is send over the instructions for the file. So we need to send over the directory in which the file is located and the file name itself. For that we need to create a new variable and we'll call that file and directory. So what that's going to ask the user is for a string. So input string, please answer the file name and directory. So we gather the file name and directory from the user and then we send it over to the slave program. So connection.send file and directory.encode and then we're going to print what should we print. We're just going to print once the command has been successfully sent. So we're just going to print let's say command has been executed successfully. We just do file removed. Okay so once we're done with this we're going to move on to the slave program and we're going to code the slave bit. So what we want to do is receive the file. So we're going to do file and directory equals s.receive. Let's receive around let's say 6,000 and then what we want to do next is we want to convert that into a normal string. So we have to decode that. So we do file and directory equals file and directory.decode which is going to overwrite the variable with the file name that we want and the file directory that we send from here and then once we've received that we're just going to do os. Remove and then we do the path and the file name. So we just do file and dir. So that should do it. And finally we're just going to print file has been removed. Oh we can just say command has been executed successfully like the other ones we did. Okay and then we can move on to testing this now. I'm pretty sure it should work in the first go so let's run the server and now we should carry on with the slave program. Let's put this on two sides now. That's the host so we're going to send the host. Okay connection successful. Remove file which is the name of the command. File name and directory. So what we're going to do is for the sake of this tutorial since the slave program is situated in a different folder along with another test file I'm going to copy the the directory for this. Okay copy and then we're going to paste it in here and then another one of those and we're going to name the file. So test docs, repress enter and then command has been executed successfully. If we go back as you see right here the test file is missing because we've just deleted it. So that was it for today's tutorial guys thank you so much for watching. Please make sure to drop a like comment subscribe for more and I'll see you in the next tutorial.