Hi! Sorry for digging out this ancient thread, but i found the posts here really useful but i've ran into a problem i can't resolve by my self.. Maybe someone can help me. I wrote a little shellscript, that uses gpg to decrypt pgp-encrypted textfiles. The script makes a folder in which it creates three files. One in which the user must paste his/her passphrase for the private key, one where the user must paste the encrypted message and one where the decrypted message will be written into by gpg. I followed the advice here in the thread and have made an "app" witch calls the script. However a strange thing happens: If i run the app, the script is definately executed, since the three files are created. When i edit the file with the passphrase and the one with the encrypted message so that the script should work, and run the "app", the decrypted file is created but it's empty. Now you would probably think there's something wrong with the script.. However, if i run it manually in mobile terminal, the message is being decrypted. There's no user input no nothing so it can't be the reason..
To sum up:
App starts and executes the script, however runs the script only partially. In mobile terminal everything runs fine..
Here's the script and the plist
Code:
mkdir -p /var/mobile/Documents/GPGMail
touch /var/mobile/Documents/GPGMail/Encrypted.txt
touch /var/mobile/Documents/GPGMail/Decrypted.txt
touch /var/mobile/Documents/GPGMail/pass
cat /var/mobile/Documents/GPGMail/pass | \
gpg -d --yes -a -o \
/var/mobile/Documents/GPGMail/Decrypted.txt \
--passphrase-fd 0 \
/var/mobile/Documents/GPGMail/Encrypted.txt
launchctl stop com.apple.SpringBoard.plist
exit
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>decrypt.sh</string>
<key>CFBundleIdentifier</key>
<string>com.unique.decrypt</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
</dict>
</plist>
Bookmarks