Show error when type letters on search option (pwsh-vault-cli)
This commit is contained in:
parent
53f54fee5d
commit
ca1c2b567e
|
@ -1122,32 +1122,40 @@ function search_entries_vault() {
|
||||||
echo "# Invalid entry. Type number entry or 'b' option."
|
echo "# Invalid entry. Type number entry or 'b' option."
|
||||||
echo ""
|
echo ""
|
||||||
else
|
else
|
||||||
result=$(cat ${pwsh_vault_cache_logins} | head -${search_show_entry} 2>/dev/null | tail -1 | cut -d "," -f 1 | cut -d "/" -f 2)
|
expr ${search_show_entry} + 1 &> /dev/null
|
||||||
corrupted_result=$(check_corrupted_entry_vault ${result} logins)
|
error=$?
|
||||||
if [ ${corrupted_result} -eq 0 ] ; then
|
if [ ${error} -eq 0 ] ; then
|
||||||
username_decrypt=$(cat logins/${result}/login | tail -1 | cut -d ";" -f 2)
|
result=$(cat ${pwsh_vault_cache_logins} | head -${search_show_entry} 2>/dev/null | tail -1 | cut -d "," -f 1 | cut -d "/" -f 2)
|
||||||
username_decrypt=$(vault_key_decrypt "${username_decrypt}")
|
corrupted_result=$(check_corrupted_entry_vault ${result} logins)
|
||||||
password_decrypt=$(cat logins/${result}/password | tail -1 | cut -d ";" -f 2)
|
if [ ${corrupted_result} -eq 0 ] ; then
|
||||||
password_decrypt=$(vault_key_decrypt "${password_decrypt}")
|
username_decrypt=$(cat logins/${result}/login | tail -1 | cut -d ";" -f 2)
|
||||||
url_decrypt=$(cat logins/${result}/url | tail -1 | cut -d ";" -f 2)
|
username_decrypt=$(vault_key_decrypt "${username_decrypt}")
|
||||||
url_decrypt=$(vault_key_decrypt "${url_decrypt}")
|
password_decrypt=$(cat logins/${result}/password | tail -1 | cut -d ";" -f 2)
|
||||||
otp_decrypt=$(cat logins/${result}/otp | tail -1 | cut -d ";" -f 2)
|
password_decrypt=$(vault_key_decrypt "${password_decrypt}")
|
||||||
otp_decrypt=$(vault_key_decrypt "${otp_decrypt}")
|
url_decrypt=$(cat logins/${result}/url | tail -1 | cut -d ";" -f 2)
|
||||||
if [ "${otp_decrypt}" == "None" ] ; then
|
url_decrypt=$(vault_key_decrypt "${url_decrypt}")
|
||||||
otp_decrypt="None"
|
otp_decrypt=$(cat logins/${result}/otp | tail -1 | cut -d ";" -f 2)
|
||||||
|
otp_decrypt=$(vault_key_decrypt "${otp_decrypt}")
|
||||||
|
if [ "${otp_decrypt}" == "None" ] ; then
|
||||||
|
otp_decrypt="None"
|
||||||
|
else
|
||||||
|
otp_decrypt="Yes"
|
||||||
|
fi
|
||||||
|
echo ""
|
||||||
|
echo "* Name Entry: logins/${result}"
|
||||||
|
echo "* Login: ${username_decrypt}"
|
||||||
|
echo "* Password: ${password_decrypt}"
|
||||||
|
echo "* URL: ${url_decrypt}"
|
||||||
|
echo "* OTP: ${otp_decrypt}"
|
||||||
|
echo ""
|
||||||
else
|
else
|
||||||
otp_decrypt="Yes"
|
echo ""
|
||||||
|
echo "# Entry logins/${result} CORRUPTED"
|
||||||
|
echo ""
|
||||||
fi
|
fi
|
||||||
echo ""
|
|
||||||
echo "* Name Entry: logins/${result}"
|
|
||||||
echo "* Login: ${username_decrypt}"
|
|
||||||
echo "* Password: ${password_decrypt}"
|
|
||||||
echo "* URL: ${url_decrypt}"
|
|
||||||
echo "* OTP: ${otp_decrypt}"
|
|
||||||
echo ""
|
|
||||||
else
|
else
|
||||||
echo ""
|
echo ""
|
||||||
echo "# Entry logins/${result} CORRUPTED"
|
echo "# Invalid entry. Type number entry or 'b' option."
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -1183,32 +1191,40 @@ function search_entries_vault() {
|
||||||
echo "# Invalid entry. Type number entry or 'b' option."
|
echo "# Invalid entry. Type number entry or 'b' option."
|
||||||
echo ""
|
echo ""
|
||||||
else
|
else
|
||||||
result=$(cat ${pwsh_vault_cache_logins} | head -${search_show_entry} 2>/dev/null | tail -1 | cut -d "," -f 1 | cut -d "/" -f 2)
|
expr ${search_show_entry} + 1 &> /dev/null
|
||||||
corrupted_result=$(check_corrupted_entry_vault ${result} logins)
|
error=$?
|
||||||
if [ ${corrupted_result} -eq 0 ] ; then
|
if [ ${error} -eq 0 ] ; then
|
||||||
username_decrypt=$(cat logins/${result}/login | tail -1 | cut -d ";" -f 2)
|
result=$(cat ${pwsh_vault_cache_logins} | head -${search_show_entry} 2>/dev/null | tail -1 | cut -d "," -f 1 | cut -d "/" -f 2)
|
||||||
username_decrypt=$(vault_key_decrypt "${username_decrypt}")
|
corrupted_result=$(check_corrupted_entry_vault ${result} logins)
|
||||||
password_decrypt=$(cat logins/${result}/password | tail -1 | cut -d ";" -f 2)
|
if [ ${corrupted_result} -eq 0 ] ; then
|
||||||
password_decrypt=$(vault_key_decrypt "${password_decrypt}")
|
username_decrypt=$(cat logins/${result}/login | tail -1 | cut -d ";" -f 2)
|
||||||
url_decrypt=$(cat logins/${result}/url | tail -1 | cut -d ";" -f 2)
|
username_decrypt=$(vault_key_decrypt "${username_decrypt}")
|
||||||
url_decrypt=$(vault_key_decrypt "${url_decrypt}")
|
password_decrypt=$(cat logins/${result}/password | tail -1 | cut -d ";" -f 2)
|
||||||
otp_decrypt=$(cat logins/${result}/otp | tail -1 | cut -d ";" -f 2)
|
password_decrypt=$(vault_key_decrypt "${password_decrypt}")
|
||||||
otp_decrypt=$(vault_key_decrypt "${otp_decrypt}")
|
url_decrypt=$(cat logins/${result}/url | tail -1 | cut -d ";" -f 2)
|
||||||
if [ "${otp_decrypt}" == "None" ] ; then
|
url_decrypt=$(vault_key_decrypt "${url_decrypt}")
|
||||||
otp_decrypt="None"
|
otp_decrypt=$(cat logins/${result}/otp | tail -1 | cut -d ";" -f 2)
|
||||||
|
otp_decrypt=$(vault_key_decrypt "${otp_decrypt}")
|
||||||
|
if [ "${otp_decrypt}" == "None" ] ; then
|
||||||
|
otp_decrypt="None"
|
||||||
|
else
|
||||||
|
otp_decrypt="Yes"
|
||||||
|
fi
|
||||||
|
echo ""
|
||||||
|
echo "* Name Entry: logins/${result}"
|
||||||
|
echo "* Login: ${username_decrypt}"
|
||||||
|
echo "* Password: ${password_decrypt}"
|
||||||
|
echo "* URL: ${url_decrypt}"
|
||||||
|
echo "* OTP: ${otp_decrypt}"
|
||||||
|
echo ""
|
||||||
else
|
else
|
||||||
otp_decrypt="Yes"
|
echo ""
|
||||||
|
echo "# Entry logins/${result} CORRUPTED"
|
||||||
|
echo ""
|
||||||
fi
|
fi
|
||||||
echo ""
|
|
||||||
echo "* Name Entry: logins/${result}"
|
|
||||||
echo "* Login: ${username_decrypt}"
|
|
||||||
echo "* Password: ${password_decrypt}"
|
|
||||||
echo "* URL: ${url_decrypt}"
|
|
||||||
echo "* OTP: ${otp_decrypt}"
|
|
||||||
echo ""
|
|
||||||
else
|
else
|
||||||
echo ""
|
echo ""
|
||||||
echo "# Entry logins/${result} CORRUPTED"
|
echo "# Invalid entry. Type number entry or 'b' option."
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -1250,27 +1266,35 @@ function search_entries_vault() {
|
||||||
echo "# Invalid entry. Type number entry or 'b' option."
|
echo "# Invalid entry. Type number entry or 'b' option."
|
||||||
echo ""
|
echo ""
|
||||||
else
|
else
|
||||||
result=$(cat ${pwsh_vault_cache_logins} | head -${search_show_entry} 2>/dev/null | tail -1 | cut -d "," -f 1 | cut -d "/" -f 2)
|
expr ${search_show_entry} + 1 &> /dev/null
|
||||||
corrupted_result=$(check_corrupted_entry_vault ${result} logins)
|
error=$?
|
||||||
if [ ${corrupted_result} -eq 0 ] ; then
|
if [ ${error} -eq 0 ] ; then
|
||||||
username_decrypt=$(cat logins/${result}/login | tail -1 | cut -d ";" -f 2)
|
result=$(cat ${pwsh_vault_cache_logins} | head -${search_show_entry} 2>/dev/null | tail -1 | cut -d "," -f 1 | cut -d "/" -f 2)
|
||||||
username_decrypt=$(vault_key_decrypt "${username_decrypt}")
|
corrupted_result=$(check_corrupted_entry_vault ${result} logins)
|
||||||
password_decrypt=$(cat logins/${result}/password | tail -1 | cut -d ";" -f 2)
|
if [ ${corrupted_result} -eq 0 ] ; then
|
||||||
password_decrypt=$(vault_key_decrypt "${password_decrypt}")
|
username_decrypt=$(cat logins/${result}/login | tail -1 | cut -d ";" -f 2)
|
||||||
url_decrypt=$(cat logins/${result}/url | tail -1 | cut -d ";" -f 2)
|
username_decrypt=$(vault_key_decrypt "${username_decrypt}")
|
||||||
url_decrypt=$(vault_key_decrypt "${url_decrypt}")
|
password_decrypt=$(cat logins/${result}/password | tail -1 | cut -d ";" -f 2)
|
||||||
otp_decrypt=$(cat logins/${result}/otp | tail -1 | cut -d ";" -f 2)
|
password_decrypt=$(vault_key_decrypt "${password_decrypt}")
|
||||||
otp_decrypt=$(vault_key_decrypt "${otp_decrypt}")
|
url_decrypt=$(cat logins/${result}/url | tail -1 | cut -d ";" -f 2)
|
||||||
echo ""
|
url_decrypt=$(vault_key_decrypt "${url_decrypt}")
|
||||||
echo "* Name Entry: logins/${result}"
|
otp_decrypt=$(cat logins/${result}/otp | tail -1 | cut -d ";" -f 2)
|
||||||
echo "* Login: ${username_decrypt}"
|
otp_decrypt=$(vault_key_decrypt "${otp_decrypt}")
|
||||||
echo "* Password: ${password_decrypt}"
|
echo ""
|
||||||
echo "* URL: ${url_decrypt}"
|
echo "* Name Entry: logins/${result}"
|
||||||
echo "* OTP: ${otp_decrypt}"
|
echo "* Login: ${username_decrypt}"
|
||||||
echo ""
|
echo "* Password: ${password_decrypt}"
|
||||||
|
echo "* URL: ${url_decrypt}"
|
||||||
|
echo "* OTP: ${otp_decrypt}"
|
||||||
|
echo ""
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
echo "# Entry logins/${result} CORRUPTED"
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo ""
|
echo ""
|
||||||
echo "# Entry logins/${result} CORRUPTED"
|
echo "# Invalid entry. Type number entry or 'b' option."
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -1308,27 +1332,35 @@ function search_entries_vault() {
|
||||||
echo "# Invalid entry. Type number entry or 'b' option."
|
echo "# Invalid entry. Type number entry or 'b' option."
|
||||||
echo ""
|
echo ""
|
||||||
else
|
else
|
||||||
result=$(cat ${pwsh_vault_cache_logins} | head -${search_show_entry} 2>/dev/null | tail -1 | cut -d "," -f 1 | cut -d "/" -f 2)
|
expr ${search_show_entry} + 1 &> /dev/null
|
||||||
corrupted_result=$(check_corrupted_entry_vault ${result} logins)
|
error=$?
|
||||||
if [ ${corrupted_result} -eq 0 ] ; then
|
if [ ${error} -eq 0 ] ; then
|
||||||
username_decrypt=$(cat logins/${result}/login | tail -1 | cut -d ";" -f 2)
|
result=$(cat ${pwsh_vault_cache_logins} | head -${search_show_entry} 2>/dev/null | tail -1 | cut -d "," -f 1 | cut -d "/" -f 2)
|
||||||
username_decrypt=$(vault_key_decrypt "${username_decrypt}")
|
corrupted_result=$(check_corrupted_entry_vault ${result} logins)
|
||||||
password_decrypt=$(cat logins/${result}/password | tail -1 | cut -d ";" -f 2)
|
if [ ${corrupted_result} -eq 0 ] ; then
|
||||||
password_decrypt=$(vault_key_decrypt "${password_decrypt}")
|
username_decrypt=$(cat logins/${result}/login | tail -1 | cut -d ";" -f 2)
|
||||||
url_decrypt=$(cat logins/${result}/url | tail -1 | cut -d ";" -f 2)
|
username_decrypt=$(vault_key_decrypt "${username_decrypt}")
|
||||||
url_decrypt=$(vault_key_decrypt "${url_decrypt}")
|
password_decrypt=$(cat logins/${result}/password | tail -1 | cut -d ";" -f 2)
|
||||||
otp_decrypt=$(cat logins/${result}/otp | tail -1 | cut -d ";" -f 2)
|
password_decrypt=$(vault_key_decrypt "${password_decrypt}")
|
||||||
otp_decrypt=$(vault_key_decrypt "${otp_decrypt}")
|
url_decrypt=$(cat logins/${result}/url | tail -1 | cut -d ";" -f 2)
|
||||||
echo ""
|
url_decrypt=$(vault_key_decrypt "${url_decrypt}")
|
||||||
echo "* Name Entry: logins/${result}"
|
otp_decrypt=$(cat logins/${result}/otp | tail -1 | cut -d ";" -f 2)
|
||||||
echo "* Login: ${username_decrypt}"
|
otp_decrypt=$(vault_key_decrypt "${otp_decrypt}")
|
||||||
echo "* Password: ${password_decrypt}"
|
echo ""
|
||||||
echo "* URL: ${url_decrypt}"
|
echo "* Name Entry: logins/${result}"
|
||||||
echo "* OTP: ${otp_decrypt}"
|
echo "* Login: ${username_decrypt}"
|
||||||
echo ""
|
echo "* Password: ${password_decrypt}"
|
||||||
|
echo "* URL: ${url_decrypt}"
|
||||||
|
echo "* OTP: ${otp_decrypt}"
|
||||||
|
echo ""
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
echo "# Entry logins/${result} CORRUPTED"
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo ""
|
echo ""
|
||||||
echo "# Entry logins/${result} CORRUPTED"
|
echo "# Invalid entry. Type number entry or 'b' option."
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -1370,27 +1402,35 @@ function search_entries_vault() {
|
||||||
echo "# Invalid entry. Type number entry or 'b' option."
|
echo "# Invalid entry. Type number entry or 'b' option."
|
||||||
echo ""
|
echo ""
|
||||||
else
|
else
|
||||||
result=$(cat ${pwsh_vault_cache_bcard} | head -${search_show_entry} 2>/dev/null | tail -1 | cut -d "," -f 1 | cut -d "/" -f 2)
|
expr ${search_show_entry} + 1 &> /dev/null
|
||||||
corrupted_result=$(check_corrupted_entry_vault ${result} bcard)
|
error=$?
|
||||||
if [ ${corrupted_result} -eq 0 ] ; then
|
if [ ${error} -eq 0 ] ; then
|
||||||
owner_decrypt=$(cat bcard/${result}/owner | tail -1 | cut -d ";" -f 2)
|
result=$(cat ${pwsh_vault_cache_bcard} | head -${search_show_entry} 2>/dev/null | tail -1 | cut -d "," -f 1 | cut -d "/" -f 2)
|
||||||
owner_decrypt=$(vault_key_decrypt "${owner_decrypt}")
|
corrupted_result=$(check_corrupted_entry_vault ${result} bcard)
|
||||||
card_decrypt=$(cat bcard/${result}/card | tail -1 | cut -d ";" -f 2)
|
if [ ${corrupted_result} -eq 0 ] ; then
|
||||||
card_decrypt=$(vault_key_decrypt "${card_decrypt}")
|
owner_decrypt=$(cat bcard/${result}/owner | tail -1 | cut -d ";" -f 2)
|
||||||
expiry_decrypt=$(cat bcard/${result}/expiry | tail -1 | cut -d ";" -f 2)
|
owner_decrypt=$(vault_key_decrypt "${owner_decrypt}")
|
||||||
expiry_decrypt=$(vault_key_decrypt "${expiry_decrypt}")
|
card_decrypt=$(cat bcard/${result}/card | tail -1 | cut -d ";" -f 2)
|
||||||
cvv_decrypt=$(cat bcard/${result}/cvv | tail -1 | cut -d ";" -f 2)
|
card_decrypt=$(vault_key_decrypt "${card_decrypt}")
|
||||||
cvv_decrypt=$(vault_key_decrypt "${cvv_decrypt}")
|
expiry_decrypt=$(cat bcard/${result}/expiry | tail -1 | cut -d ";" -f 2)
|
||||||
echo ""
|
expiry_decrypt=$(vault_key_decrypt "${expiry_decrypt}")
|
||||||
echo "* Name Entry: bcard/${result}"
|
cvv_decrypt=$(cat bcard/${result}/cvv | tail -1 | cut -d ";" -f 2)
|
||||||
echo "* Owner: ${owner_decrypt}"
|
cvv_decrypt=$(vault_key_decrypt "${cvv_decrypt}")
|
||||||
echo "* Card: ${card_decrypt}"
|
echo ""
|
||||||
echo "* Expiry: ${expiry_decrypt}"
|
echo "* Name Entry: bcard/${result}"
|
||||||
echo "* CVV: ${cvv_decrypt}"
|
echo "* Owner: ${owner_decrypt}"
|
||||||
echo ""
|
echo "* Card: ${card_decrypt}"
|
||||||
|
echo "* Expiry: ${expiry_decrypt}"
|
||||||
|
echo "* CVV: ${cvv_decrypt}"
|
||||||
|
echo ""
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
echo "# Entry bcard/${result} CORRUPTED"
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo ""
|
echo ""
|
||||||
echo "# Entry bcard/${result} CORRUPTED"
|
echo "# Invalid entry. Type number entry or 'b' option."
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -1426,27 +1466,35 @@ function search_entries_vault() {
|
||||||
echo "# Invalid entry. Type number entry or 'b' option."
|
echo "# Invalid entry. Type number entry or 'b' option."
|
||||||
echo ""
|
echo ""
|
||||||
else
|
else
|
||||||
result=$(cat ${pwsh_vault_cache_bcard} | head -${search_show_entry} 2>/dev/null | tail -1 | cut -d "," -f 1 | cut -d "/" -f 2)
|
expr ${search_show_entry} + 1 &> /dev/null
|
||||||
corrupted_result=$(check_corrupted_entry_vault ${result} bcard)
|
error=$?
|
||||||
if [ ${corrupted_result} -eq 0 ] ; then
|
if [ ${error} -eq 0 ] ; then
|
||||||
owner_decrypt=$(cat bcard/${result}/owner | tail -1 | cut -d ";" -f 2)
|
result=$(cat ${pwsh_vault_cache_bcard} | head -${search_show_entry} 2>/dev/null | tail -1 | cut -d "," -f 1 | cut -d "/" -f 2)
|
||||||
owner_decrypt=$(vault_key_decrypt "${owner_decrypt}")
|
corrupted_result=$(check_corrupted_entry_vault ${result} bcard)
|
||||||
card_decrypt=$(cat bcard/${result}/card | tail -1 | cut -d ";" -f 2)
|
if [ ${corrupted_result} -eq 0 ] ; then
|
||||||
card_decrypt=$(vault_key_decrypt "${card_decrypt}")
|
owner_decrypt=$(cat bcard/${result}/owner | tail -1 | cut -d ";" -f 2)
|
||||||
expiry_decrypt=$(cat bcard/${result}/expiry | tail -1 | cut -d ";" -f 2)
|
owner_decrypt=$(vault_key_decrypt "${owner_decrypt}")
|
||||||
expiry_decrypt=$(vault_key_decrypt "${expiry_decrypt}")
|
card_decrypt=$(cat bcard/${result}/card | tail -1 | cut -d ";" -f 2)
|
||||||
cvv_decrypt=$(cat bcard/${result}/cvv | tail -1 | cut -d ";" -f 2)
|
card_decrypt=$(vault_key_decrypt "${card_decrypt}")
|
||||||
cvv_decrypt=$(vault_key_decrypt "${cvv_decrypt}")
|
expiry_decrypt=$(cat bcard/${result}/expiry | tail -1 | cut -d ";" -f 2)
|
||||||
echo ""
|
expiry_decrypt=$(vault_key_decrypt "${expiry_decrypt}")
|
||||||
echo "* Name Entry: bcard/${result}"
|
cvv_decrypt=$(cat bcard/${result}/cvv | tail -1 | cut -d ";" -f 2)
|
||||||
echo "* Owner: ${owner_decrypt}"
|
cvv_decrypt=$(vault_key_decrypt "${cvv_decrypt}")
|
||||||
echo "* Card: ${card_decrypt}"
|
echo ""
|
||||||
echo "* Expiry: ${expiry_decrypt}"
|
echo "* Name Entry: bcard/${result}"
|
||||||
echo "* CVV: ${cvv_decrypt}"
|
echo "* Owner: ${owner_decrypt}"
|
||||||
echo ""
|
echo "* Card: ${card_decrypt}"
|
||||||
|
echo "* Expiry: ${expiry_decrypt}"
|
||||||
|
echo "* CVV: ${cvv_decrypt}"
|
||||||
|
echo ""
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
echo "# Entry bcard/${result} CORRUPTED"
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo ""
|
echo ""
|
||||||
echo "# Entry bcard/${result} CORRUPTED"
|
echo "# Invalid entry. Type number entry or 'b' option."
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -1487,19 +1535,27 @@ function search_entries_vault() {
|
||||||
echo "# Invalid entry. Type number entry or 'b' option."
|
echo "# Invalid entry. Type number entry or 'b' option."
|
||||||
echo ""
|
echo ""
|
||||||
else
|
else
|
||||||
result=$(cat ${pwsh_vault_cache_notes} | head -${search_show_entry} 2>/dev/null | tail -1 | cut -d "," -f 1 | cut -d "/" -f 2)
|
expr ${search_show_entry} + 1 &> /dev/null
|
||||||
corrupted_result=$(check_corrupted_entry_vault ${result} notes)
|
error=$?
|
||||||
if [ ${corrupted_result} -eq 0 ] ; then
|
if [ ${error} -eq 0 ] ; then
|
||||||
note_decrypt=$(cat notes/${result}/note | tail -1 | cut -d ";" -f 2)
|
result=$(cat ${pwsh_vault_cache_notes} | head -${search_show_entry} 2>/dev/null | tail -1 | cut -d "," -f 1 | cut -d "/" -f 2)
|
||||||
note_decrypt=$(vault_key_decrypt "${note_decrypt}")
|
corrupted_result=$(check_corrupted_entry_vault ${result} notes)
|
||||||
note_decrypt=$(restoreSpaces "${note_decrypt}")
|
if [ ${corrupted_result} -eq 0 ] ; then
|
||||||
echo ""
|
note_decrypt=$(cat notes/${result}/note | tail -1 | cut -d ";" -f 2)
|
||||||
echo "* Name Entry: notes/${result}"
|
note_decrypt=$(vault_key_decrypt "${note_decrypt}")
|
||||||
echo "* Note: ${note_decrypt}"
|
note_decrypt=$(restoreSpaces "${note_decrypt}")
|
||||||
echo ""
|
echo ""
|
||||||
|
echo "* Name Entry: notes/${result}"
|
||||||
|
echo "* Note: ${note_decrypt}"
|
||||||
|
echo ""
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
echo "# Entry notes/${result} CORRUPTED"
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo ""
|
echo ""
|
||||||
echo "# Entry notes/${result} CORRUPTED"
|
echo "# Invalid entry. Type number entry or 'b' option."
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -1535,19 +1591,27 @@ function search_entries_vault() {
|
||||||
echo "# Invalid entry. Type number entry or 'b' option."
|
echo "# Invalid entry. Type number entry or 'b' option."
|
||||||
echo ""
|
echo ""
|
||||||
else
|
else
|
||||||
result=$(cat ${pwsh_vault_cache_notes} | head -${search_show_entry} 2>/dev/null | tail -1 | cut -d "," -f 1 | cut -d "/" -f 2)
|
expr ${search_show_entry} + 1 &> /dev/null
|
||||||
corrupted_result=$(check_corrupted_entry_vault ${result} notes)
|
error=$?
|
||||||
if [ ${corrupted_result} -eq 0 ] ; then
|
if [ ${error} -eq 0 ] ; then
|
||||||
note_decrypt=$(cat notes/${result}/note | tail -1 | cut -d ";" -f 2)
|
result=$(cat ${pwsh_vault_cache_notes} | head -${search_show_entry} 2>/dev/null | tail -1 | cut -d "," -f 1 | cut -d "/" -f 2)
|
||||||
note_decrypt=$(vault_key_decrypt "${note_decrypt}")
|
corrupted_result=$(check_corrupted_entry_vault ${result} notes)
|
||||||
note_decrypt=$(restoreSpaces "${note_decrypt}")
|
if [ ${corrupted_result} -eq 0 ] ; then
|
||||||
echo ""
|
note_decrypt=$(cat notes/${result}/note | tail -1 | cut -d ";" -f 2)
|
||||||
echo "* Name Entry: notes/${result}"
|
note_decrypt=$(vault_key_decrypt "${note_decrypt}")
|
||||||
echo "* Note: ${note_decrypt}"
|
note_decrypt=$(restoreSpaces "${note_decrypt}")
|
||||||
echo ""
|
echo ""
|
||||||
|
echo "* Name Entry: notes/${result}"
|
||||||
|
echo "* Note: ${note_decrypt}"
|
||||||
|
echo ""
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
echo "# Entry notes/${result} CORRUPTED"
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo ""
|
echo ""
|
||||||
echo "# Entry notes/${result} CORRUPTED"
|
echo "# Invalid entry. Type number entry or 'b' option."
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user