201309090
This commit is contained in:
9
decryptFileByRSA.sh
Executable file
9
decryptFileByRSA.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
FILE=$1
|
||||
KEY=$2
|
||||
openssl base64 -d -in key.b64 -out key.enc
|
||||
openssl base64 -d -in $FILE.b64 -out $FILE.enc
|
||||
openssl rsautl -decrypt -inkey $KEY -in key.enc -out key
|
||||
openssl enc -d -aes-256-cbc -salt -in $FILE.enc -out $FILE.dec -kfile key
|
||||
mv $FILE.dec $FILE
|
||||
rm key key.enc $FILE.enc
|
||||
Reference in New Issue
Block a user