Advertisement
Guest User

Untitled

a guest
Aug 31st, 2015
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. #! /bin/bash
  2.  
  3. DIR="path/folder"
  4. DIR2="path/.folder"
  5. pass="Z2FsdGVkX18vy4f4QRB3qnb5vIWR0x+tlZmdAmPxX8Y="
  6. input=""
  7. result=""
  8.  
  9. basic()
  10. {
  11. if [ -d "$DIR" ]
  12. then
  13. clear
  14. mv $DIR $DIR2
  15. elif [ -d "$DIR2" ]
  16. then
  17. echo -n ": "
  18. read -rs input
  19. result=$(echo "$pass"| openssl enc -aes-128-cbc -a -d -salt -pass pass:wtf)
  20.  
  21. if [ "$result" = "$input" ]
  22. then
  23. clear
  24. mv $DIR2 $DIR
  25. else
  26. clear
  27. fi
  28. else
  29. :
  30. fi
  31. exit
  32. }
  33.  
  34. open()
  35. {
  36. if [ -d "$DIR" ]
  37. then
  38. clear
  39. mv $DIR $DIR2
  40. elif [ -d "$DIR2" ]
  41. then
  42. echo -n ": "
  43. read -rs input
  44. result=$(echo "$pass"| openssl enc -aes-128-cbc -a -d -salt -pass pass:wtf)
  45.  
  46. if [ "$result" = "$input" ]
  47. then
  48. clear
  49. mv $DIR2 $DIR
  50. open $DIR
  51. else
  52. echo "error"
  53. fi
  54. else
  55. :
  56. fi
  57. exit
  58. }
  59.  
  60. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Main ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  61. if [ $# -eq 0 ]
  62. then
  63. basic
  64. elif [ $# -eq 1 ]
  65. then
  66. if [ "$1" = "-o" ]
  67. then
  68. open
  69. else
  70. :
  71. fi
  72. fi
  73. clear
  74. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ End of File ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement