Last active
April 27, 2019 07:48
-
-
Save jankais3r/1628688baf8d8e066817c51359cacfe0 to your computer and use it in GitHub Desktop.
Apple Script that automates the mounting process of a Bitlocker partition
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--More details in this thread: https://twitter.com/jankais3r/status/1069974420150804480 | |
tell application "Terminal" | |
if not (exists window 1) then reopen | |
activate | |
do script "sudo -n mount-dislocker /dev/disk0s3 `base64 -D <<< YourBitlockerPasswordEncodedInBase64GoesHere` ; exit" in window 1 | |
repeat while (exists window 1) | |
end repeat | |
quit | |
end tell | |
tell application "Terminal" | |
if not (exists window 1) then reopen | |
activate | |
do script "sed -i '' -e '$ d' ~/.bash_history; exit" in window 1 | |
repeat while (exists window 1) | |
end repeat | |
quit | |
end tell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Terminal" | |
if not (exists window 1) then reopen | |
activate | |
do script "sudo -n umount-dislocker /dev/disk0s3 ; exit" in window 1 | |
repeat while (exists window 1) | |
end repeat | |
quit | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment