Codebase list gpp-decrypt / 069a53e
Pre-build commit Devon Kearns 11 years ago
2 changed file(s) with 20 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 Patched so that the script accepts the hash as an argument, rather than having it coded in the script.
1 --- a/gpp-decrypt.rb
2 +++ b/gpp-decrypt.rb
3 @@ -3,8 +3,14 @@ require 'rubygems'
4 require 'openssl'
5 require 'base64'
6
7 +unless ARGV.length == 1
8 + puts "Usage: #{File.basename($0)}: encrypted_data"
9 + exit
10 +end
11
12 -encrypted_data = "j1Uyj3Vx8TY9LtLZil2uAuZkFQA/4latT76ZwgdHdhw"
13 +encrypted_data = ARGV[0]
14 +
15 +#encrypted_data = "j1Uyj3Vx8TY9LtLZil2uAuZkFQA/4latT76ZwgdHdhw"
16
17 def decrypt(encrypted_data)
18 padding = "=" * (4 - (encrypted_data.length % 4))