From 29cb4037e224b2f2f4b2266442948034a51faada Mon Sep 17 00:00:00 2001 From: ppwwyyxx Date: Wed, 7 Jan 2015 22:19:17 +0800 Subject: [PATCH] readme and prompt --- decrypt_db.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/decrypt_db.sh b/decrypt_db.sh index 5d6a477..3b2977e 100755 --- a/decrypt_db.sh +++ b/decrypt_db.sh @@ -1,6 +1,6 @@ #!/bin/bash -e # File: decrypt_db.sh -# Date: Wed Dec 31 23:38:16 2014 +0800 +# Date: Wed Jan 07 22:08:56 2015 +0800 # Author: Yuxin Wu MSGDB=$1 @@ -13,6 +13,13 @@ if [[ -z "$1" || -z "$2" || -z "$3" ]]; then exit fi +if [[ -f $output ]]; then + echo "$output already exists. removed? (y/n)" + read r + [[ $r == "y" ]] && rm -v $output || exit 1 +fi + + KEY=$(echo -n "$imei$uin" | md5sum | cut -b 1-7) echo "KEY: $KEY"