├── README.md ├── caught ├── demo.gif └── install /README.md: -------------------------------------------------------------------------------- 1 | caught 2 | ====== 3 | 4 | Takes pictures when someone enters a wrong password 5 | 6 | #####Demo 7 | ![demo](demo.gif) 8 | Instructions 9 | ------------ 10 | ```sh 11 | $ git clone https://github.com/Spockuto/caught 12 | $ cd caught 13 | $ ./install 14 | ``` 15 | Make the following changes in /etc/pam.d/common-auth 16 | 17 | ```sh 18 | auth [success=3 default=ignore] pam_unix.so nullok_secure 19 | ``` 20 | 21 | Increment the number by 1. Add the following line right under it. 22 | 23 | ```sh 24 | auth [default=ignore] pam_exec.so seteuid /usr/local/bin/caught 25 | ``` 26 | 27 | Dependencies 28 | ------------ 29 | [ffmpeg](https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu) 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /caught: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | filename=`date +%s` 3 | ffmpeg -f video4linux2 -s vga -i /dev/video0 -vframes 3 /tmp/wrongpassword-$filename.%01d.jpg 4 | exit 0 -------------------------------------------------------------------------------- /demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Spockuto/caught/4a115a1e10aa1a37f0bcb9cfb2a55d2f26e5c17d/demo.gif -------------------------------------------------------------------------------- /install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | sudo su 3 | cp ./caught /usr/local/bin/ 4 | chmod +x /usr/local/bin/caught 5 | sudo -k --------------------------------------------------------------------------------