under_r00t

denc.sh

Dec 26th, 2014
313
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.47 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. str="$2" ;
  4.  
  5. fun_enc() {
  6. echo "[!]codifico:"
  7. echo [-] $str|tr "[.0-9a-zA-Z\/\/\:]" "[a-zA-Z0-9\;-=+*\/]"
  8. }
  9.  
  10. fun_dec() {
  11. echo "[!]decodifico:"
  12. echo [-] $str|tr "[a-zA-Z0-9\;-=+*\/]" "[.0-9a-zA-Z\/\/\:]"
  13. }
  14.  
  15. fun_help() {
  16. echo "con l\'opzione \"e\" codifico la stringa che mi passi"
  17. echo "con l\'opzione \"d\" decodifico la stringa che mi passi"
  18. echo "Happy Hacking"
  19. exit 1
  20. }
  21.  
  22. case $1 in
  23.     e) fun_enc ;;
  24.     d) fun_dec ;;
  25.     *) fun_help ;;
  26.    
  27. esac
  28.  
  29. exit 0
Advertisement
Add Comment
Please, Sign In to add comment