Everyone will come to a new video with our Python lessons.
Last time we talked about how to control our multi threading sessions and interact with each one individually,
and today we will talk about the subprocess module.
The subprocess module allows us to execute shell commands and read the output into a variable.
And since we need our back door to be able to execute seemed or commands, then we will use this function
allowed.
The subprocess module is very simple.
As you can see from the slides, we use the open function to execute some commands, but we have to
pass the shell equal argument to it, otherwise it won't work.
Let's try this subprocess module on our Windows client, but this time we will replace the dash, the
dash l command with the data we receive from our server.
This is our Windows client.
Now let's start our server and connect to it.
Now, let's check our sessions.
Now I'm going to interact with session number one.
I'm going to send the who I my command to the other Windows client.
As you see, I got the name here.
Let's try a different command.
Now it is working.
We sent a command to our Windows client here and then the command was executed using the subprocess
module and then we got the data back to our server.
That was it.
We are done with our Cyprus module.
Thank you and see you in the next video.