#!/bin/bash

#    Simple script to take picture after entering wrong password in Linux
#    
#    Requirements:
#    Install ffmpeg or avconv
#    apt-get install libav-tools
#    (at your option) any later version.
# 
#    blackMORE Ops <www.blackmoreops.com> 
#    https://www.blackmoreops.com/2016/10/12/take-picture-of-unauthorized-user-trying-to-access-your-laptop/

ts=`date +%s`
ffmpeg -f video4linux2 -s vga -i /dev/video0 -vframes 3 /tmp/vid-$ts.%01d.jpg
exit 0  
#important - has to exit with status 0


syntax highlighted by Code2HTML, v. 0.9.1