Open tbbmz1907 opened 4 years ago
If you want to be stealthy, it would be prudent to tweak a couple of things:
-w
option to 2
/usr/local/snapperwmailf/img/
sendEmail
CLI, which you can install with Homebrew, and which can run silently in the background; or…shutdown
, snapping more images (manually), read geolocation with CoreLocationCLI
etc.
This (snapperwmailf.app) is an applescript based app which snaps an image (in this case when the lid of the laptop is opened) and then sends an email alert along with the image. I'm not really a programmer (but have some background), so it took me a while to figure this out. But I hope it helps some other people...
This script uses: http://iharder.sourceforge.net/current/macosx/imagesnap/ You can find installation instructions and sample usage here: https://eyetea33.wordpress.com/2013/06/11/take-pictures-using-facetime-hd-or-isight-camera-on-mac-wakeup/
You should export the script as an app (using script editor), and then take some steps to make sure the system doesn't ask you for permission to use the camera and mail app each time. Read the comments of JayBrown how to achieve this here https://github.com/rharder/imagesnap/issues/26. But basically,
"Open the Info.plist (visible when you say show package contents of the app), add key LSUIElement with boolean true, change the BundleID, if you want, change the bundle icon"
Then You should also create a self-signed certificate, and then sign the app with the certificate.
The system will ask the permission to use the camera and mail for the first time. But if you did the signing right it shouldn't ask again. Then on DND's preferences, you say execute action and provide: open ~/Desktop/ImageSnap/snapperwmailf.app