So, I have a bit of a problem. I have an encrypted dmg file that I have forgotten the password for. Thanks to a younger (and dumber) version of myself using formulaic passwords, I was able to create a relatively small wordlist of the possible passwords. After some research, I found an applescript on an old metafilter discussion here that would test the wordlist against the encrypted dmg.
When I try to run the script in the applescript editor i get the following error (also in the attached screen shot):
Here is the script:
If anyone could help me out with the applescript I would really appreciate it. I know next to nothing about applescripts.
When I try to run the script in the applescript editor i get the following error (also in the attached screen shot):
"Expected end of line, etc. but found parameter name."
Here is the script:
Code:
#!/bin/bash
for word in $(cat wordlist.txt | grep -v "#")
do
echo -n $word | hdiutil attach -mount -encryption -stdinpass - image.dmg
if [[ $? = 0 ]]
then
echo "Password found!"
echo $word
exit 0
fi
done
echo "password not found :("
exit 1
If anyone could help me out with the applescript I would really appreciate it. I know next to nothing about applescripts.