From 7e53e634763be9dd52a59e9203147297cac011d2 Mon Sep 17 00:00:00 2001 From: jgaunt Date: Tue, 25 May 2021 13:21:50 -0400 Subject: [PATCH] added code for csplit for search the metadata --- dislocker.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dislocker.sh b/dislocker.sh index 403e7b4..35ff0b0 100644 --- a/dislocker.sh +++ b/dislocker.sh @@ -7,7 +7,13 @@ unlockedBitlockerMountPoint="/mnt/unlockedBitlocker" # get list of drives and find ones labeled with bitlocker 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