This Python script captures an image from your webcam when executed and saves it in the data/intruder
directory with a timestamp in the filename. Additionally, it simulates keyboard actions to lock the screen after capturing the image.
- Python 3
- OpenCV (cv2) library
- PyAutoGUI library
- Clone this repository to your local machine.
git clone https://github.com/arpy8/IntruderShield.git
cd IntruderShield
- Install the required Python libraries.
pip install opencv-python pyautogui
- Run the executable script.
start main.exe
-
The script will capture an image using your webcam and save it in the
data/intruder
directory. -
After capturing the image, the script will simulate keyboard actions to lock the screen.
Note: Locking the screen with the provided method might not work reliably on all operating systems or configurations. Consider using the alternative locking commands based on your system (Windows, macOS, or Linux) as mentioned in the comments within the script.
Contributions are welcome! If you find any issues or have ideas to improve this project, feel free to open an issue or create a pull request.
This project is licensed under the MIT License.