Skip to content
This repository has been archived by the owner on May 27, 2021. It is now read-only.

Commit

Permalink
Added constants for root, system, programs, users and home path
Browse files Browse the repository at this point in the history
  • Loading branch information
tomas committed Mar 20, 2010
1 parent 554a9d2 commit 744779d
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
3 changes: 3 additions & 0 deletions core/setup
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,14 @@ get_os(){
os=mac
fi
logged_user=`who | cut -d' ' -f1 | sort -u | tail -1`
readonly root_path='/'
readonly home_path=`eval echo ~`
fi

readonly os
readonly platform_path="$base_path/platform/$os"
PATH=$PATH:$platform_path/bin

}

set_vars(){
Expand Down
4 changes: 4 additions & 0 deletions platform/linux/settings
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
# URL: http://preyproject.com
# License: GPLv3
####################################################################

readonly system_path="/etc"
readonly users_path="/home"
readonly programs_path="/usr"
4 changes: 4 additions & 0 deletions platform/mac/settings
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
# License: GPLv3
####################################################################

readonly system_path="/Library"
readonly users_path="/Users"
readonly programs_path="/Applications"

readonly logged_pid=`ps -ax | grep loginwindow.app | grep -v grep | awk '{print $1}'`
readonly airport='/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport'
readonly prey_agent_plist="/Library/LaunchDaemons/com.prey.agent.plist"
17 changes: 15 additions & 2 deletions platform/windows/settings
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,26 @@
# License: GPLv3
####################################################################

logged_user=`whoami`
tmpdir="$base_path\platform\windows\etc\p${RANDOM}" # "random" name to make it harder to detect

readonly root_path='C:\'
readonly system_path="$WINDIR"
readonly programs_path="C:\Program\ Files"

if [ -d "C:\Users" ]; then # vista and up
readonly users_path="C:\Users"
else # xp and 2000
readonly users_path="C:\Documents\ and\ Settings"
fi

readonly home_path="$users_path\\${logged_user}"

readonly required_net_version='2.0.50727'
readonly prey_reg_key="HKLM\Software\Prey"

patcher='patsh' # Windows 7 geniously blocks anything named "patch" from being run
logged_user=`whoami`
line_breaker="\r\n"
tmpdir="$base_path\platform\windows\etc\p${RANDOM}" # "random" name to make it harder to detect

arch=`echo $PROCESSOR_ARCHITEW6432`
if [ `find_in "$arch" '64'` ]; then
Expand Down

0 comments on commit 744779d

Please sign in to comment.