Advertisement
Guest User

Untitled

a guest
May 16th, 2018
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. if [[ "$input" -eq 1 ]]; then
  4.  
  5. inspec exec tests/$plateform -t ssh://$user:$password@$target --reporter html:/share/reports/local-machine-$plateform.html
  6.  
  7. elif [[ "$input" -eq 2 ]]; then
  8.  
  9. inspec exec tests/$plateform -t ssh://$user:$password@$target --reporter html:/share/reports/$target-$plateform.html
  10.  
  11. elif [[ "$input" -eq 3 ]]; then
  12.  
  13. inspec exec tests/$plateform -t ssh://$user@$target -i /share/private_key --reporter html:/share/reports/$target-$plateform.html
  14. fi
  15. e=$?
  16.  
  17. restore='\033[0m'
  18. red='\033[1;31m'
  19.  
  20. if [ $e -ne 0 ]; then
  21. echo -e "$red Une erreur s'est produite ! Vérifiez que les informations entrées sont correctes puis Répétez le scan ! $restore"
  22. fi;
  23.  
  24. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement