added code for csplit for search the metadata

This commit is contained in:
2021-05-25 13:21:50 -04:00
parent afc713a68f
commit 7e53e63476

View File

@@ -7,7 +7,13 @@ unlockedBitlockerMountPoint="/mnt/unlockedBitlocker"
# get list of drives and find ones labeled with bitlocker # get list of drives and find ones labeled with bitlocker
bitlockerPartition=`dislocker-find` bitlockerPartition=`dislocker-find`
bitlockerRecoveryKeyID=`dislocker-metadata -V ${bitlockerPartition} | awk '/Recovery Key GUI:/ {print $10; exit}' | sed "s/'//g"`
# need to loop through the find results, find the TPM info, and then look for the recovery password id
# need to use csplit on the metadata
# csplit -f ${bitlockerPartition} -n 1 Desktop/dislocker-metadata.txt "/=======\[ Datum ... informations \]=======/" '{*}'
bitlockerRecoveryKeyID=`dislocker-metadata -V ${bitlockerPartition} | awk '/Recovery Key GUID:/ {print $10; exit}' | sed "s/'//g"`
# confirm drive # confirm drive