Advertisement
geofferey

[BASH] Prey Anti-theft Installer for PowerPC Mac OSX

Mar 10th, 2014
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.54 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. #PREY 0.6.2 automated  installer for PowerPC
  4. #This script was desiged to install http://www.preyproject.com
  5. #Anti-theft software on older PowerPC computers running OSX
  6. #Download the batch installer from http://preyproject.com/releases/current/prey-0.6.2-mac-batch.mpkg.zip
  7. # & run this script from same directory batch installer is located in
  8. # Do not change any file names!
  9.  
  10. echo ""
  11. echo " ## Watch as PREY 0.6.2 gracefully spreads its wings on your old PowerPC!"
  12. echo " ## $(uname -n) $(uname -s) $(uname -r) $(uname -m) $(uname -p)"
  13. echo " ## $(date)"
  14. echo ""
  15.  
  16. if [ $(find /usr/share/curl -name old.curl-ca-bundle.crt |wc -l) -eq 0 ]; then
  17. echo " ## It appears your  certificates are probably outdated!";
  18. echo " ## They're required in order to establish a connection.";
  19. echo " ## I will take the liberty of updateing them for you.";
  20. echo " ## Only good will come from this :)";
  21. echo ""
  22. curl http://curl.haxx.se/ca/cacert.pem -o /usr/share/curl/new_cacert.pem;
  23. echo ""
  24. mv /usr/share/curl/curl-ca-bundle.crt /usr/share/curl/old.curl-ca-bundle.crt;
  25. echo ""
  26. mv /usr/share/curl/new_cacert.pem /usr/share/curl/curl-ca-bundle.crt;
  27. fi
  28.  
  29. read -p " Please provide your API Key:" INPUT_API_KEY
  30.  
  31. while [[ -z "$INPUT_API_KEY" ]]; do
  32. echo ""
  33. echo " API Key can't be blank, you can find it at:"
  34. echo " https://panel.preyproject.com/profile"
  35. echo ""
  36. read -s -p " Please provide your API Key:" INPUT_API_KEY;
  37. echo ""
  38. done
  39.  
  40. export API_KEY="$INPUT_API_KEY"
  41.  
  42. installer -pkg prey-0.6.2-mac-batch.mpkg -target / && /usr/share/prey/prey.sh -c
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement