I would like a program that would exist on my flash drive that, when run, would
- open an encrypted disk image with a stored password
- then change the password to a random number
- store it for using it the next time
Can this be done?
I would like a program that would exist on my flash drive that, when run, would
Can this be done?
If you know shell script, you can write s simple program that does that. Use hdiutil
to change an encrypted disk password:
hdiutil chpass [image_name]
It will interactively ask you for your previous password and new password so you have to use some pipes or maybe expect. To generate a random number, echo $RANDOM
should do. To store the passwords you can use a simple text file, if you don't mind keeping it unprotected.
expect
. Take a look at some Wikipedia examples: en.wikipedia.org/wiki/Expect#Examples
(echo "oldpw"; echo "newpw") | hdiutil <img>
.