Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

49 lines (39 sloc) 1.31 kb
#!/bin/bash
####################################################################
# PREY Windows Base Functions - by Tomas Pollak (bootlog.org)
# URL: http://preyproject.com
# License: GPLv3
####################################################################
function get_gateway_ip {
gateway_ip=`ipconfig | grep Gateway | sed 's/^.*: //g' | grep -v '^$' | head -1`
}
function try_to_connect {
# netsh wlan connect name=Profile2 ssid=SSID2 interface="Wireless Network Connection"
echo ' !! Autoconnect in Windows still in development/testing mode. Thanks for your patience!'
}
function get_current_delay {
delay_in_miliseconds=`cat $base_path/delay`
echo $(($delay_in_miliseconds/60000))
}
function update_execution_delay {
delay_in_miliseconds=$(($delay*60*1000))
echo "$delay_in_miliseconds" > $base_path/delay
}
# module de/activation functions
function is_module_active {
cat $base_path/modules/$1/active 2> /dev/null
}
function activate_module {
touch $base_path/modules/$1/active
echo 1 > $base_path/modules/$1/active
}
function deactivate_module {
# echo 0 > $base_path/modules/$1/active
rm -f $base_path/modules/$1/active 2> /dev/null
}
function deactivate_all_modules {
for file in `find $base_path/modules -name active`; do
# echo 0 > $file
rm -f $file 2> /dev/null
done
}
Jump to Line
Something went wrong with that request. Please try again.