Merge pull request #4025 from rishwanth1995/develop

validate user input in launch_bootable_Script
This commit is contained in:
Richard Cordovano 2018-08-09 10:01:49 -04:00 committed by GitHub
commit 7f1d1b995b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,7 @@ errorLog () {
exit 1
}
Verify we can find the script
#Verify we can find the script
if [[ -x "$AUTOPSY_BIN" ]]; then
infoLog "Autopsy found"
else
@ -66,7 +66,11 @@ showAndReadOptions () {
echo [$x] "${word}"
x=$((x + 1))
done
read option
read -n 1 option
if [[ $option = "" ]] || ! [[ "$option" =~ ^[0-9]+$ ]]; then
echo "Please choose a valid option"
showAndReadOptions
fi
}