#!/bin/bash
####################################################################
# Prey Secure Module - by Tomas Pollak (bootlog.org)
# URL: http://preyproject.com
# License: GPLv3
####################################################################

# AFAIK windows doesnt have a keychain as linux and Mac do...
if [[ "$secure__delete_credentials" == 'y' && "$os" != "windows" ]]; then
	hide_credentials
fi

if [ "$secure__delete_firefox_data" == 'y' ]; then
	hide_data_from 'firefox' "$firefox_path"
fi

if [ "$secure__delete_chrome_data" == 'y' ]; then
	hide_data_from 'chrome' "$chrome_path"
	if [ "$os" == "linux" ]; then
		hide_data_from 'chromium-browser' "$chromium_path"
	fi
fi

# Prey currently handles Safari only in Mac/Windows, not in other environments such as Wine. Sorry. :)
if [[ "$secure__delete_safari_data" == 'y' && "$os" != 'linux' ]]; then
	hide_data_from 'safari' "$safari_path"
fi

if [ "$secure__hide_thunderbird_data" == 'y' ]; then
	hide_data_from 'thunderbird' "$thunderbird_path"
fi

if [[ "$secure__hide_outlook_data" == 'y' && "$os" == "windows" ]]; then
	hide_data_from 'outlook' "$outlook_path"
fi

# Prey currently handles IE among Windows, not in other environments such as Wine. Sorry. :)
if [[ "$secure__delete_ie_data" == 'y' && "$os" == "windows" ]]; then
	delete_ie_data
fi
