No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

calcul-empreintes-hids.sh 545B

1234567891011121314151617181920212223242526
  1. #!/bin/bash
  2. #######################
  3. ## ##
  4. ## HIDS By GotExx ##
  5. ## ##
  6. #######################
  7. NC='\033[0m'
  8. current_datetime=$(date +%D-%T)
  9. path=/home/hugo/sites/wordpress
  10. text_file=$1
  11. if [ -d $path ];then
  12. for line in $(cat $text_file);
  13. do
  14. if [ -f $path/$line ];then
  15. sha1sum $path/$line > ./checkedfile.checksum
  16. elif [ -d $path/$line ];then
  17. echo "$path/$line n'est pas un fichier valide"
  18. else
  19. echo "erreur NC"
  20. fi
  21. done
  22. echo -e "Empreintes calculées."
  23. else
  24. echo -e "Chemin inconnu"
  25. fi