Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

-Added a script that keeps the Stolen status even if there is no conn…

…ection.

 The stolen status will be activated when the url says so.
 If the pc is reported stolen and there is no connection, it will execute other modules that helps to find it and don't need internet.
 The stolen status will be removed when the url says so
  • Loading branch information...
commit 76d4f59dec4fbbf98c046f563332b705858ee271 1 parent f339d12
@dtorres dtorres authored
Showing with 9 additions and 5 deletions.
  1. +9 −5 prey.sh
View
14 prey.sh
@@ -28,7 +28,6 @@ fi
# ok lets get going now
-os=`uname | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/"`
. $base_path/platform/base
. $base_path/platform/$os
@@ -54,10 +53,8 @@ if [ $connected == 0 ]; then
check_net_status
if [ $connected == 0 ]; then
echo "$STRING_NO_CONNECT_TO_WIFI"
- exit
fi
fi
-
####################################################################
# if there's a URL in the config, lets see if it actually exists
# if it doesn't, the program will shut down gracefully
@@ -66,11 +63,19 @@ fi
if [ -n "$check_url" ]; then
echo "$STRING_CHECK_URL"
check_status
-
if [ "$status" == '200' ]; then
echo -e "$STRING_PROBLEM"
parse_headers
process_response
+ sed -i -e "s/pc_status='.*'/pc_status='Stolen'/" $base_path/config
+ elif [[ "$status" == '404' && "$pc_status" == 'Stolen' ]]; then
+ sed -i -e "s/pc_status='.*'/pc_status=''/" $base_path/config
+ echo -e "$STRING_NO_PROBLEM"
+ exit
+ elif [ "$pc_status" == 'Stolen' ]; then
+ echo -e "$STRING_PROBLEM"
+ parse_headers
+ process_response
else
echo -e "$STRING_NO_PROBLEM"
exit
@@ -85,4 +90,3 @@ fi
echo -e " -- Running active modules..."
run_active_modules
echo -e "$STRING_DONE"
-
Please sign in to comment.
Something went wrong with that request. Please try again.