Skip to content

Instantly share code, notes, and snippets.

Created September 20, 2016 21:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/f2de92374045c001126fde84ac572a42 to your computer and use it in GitHub Desktop.
Save anonymous/f2de92374045c001126fde84ac572a42 to your computer and use it in GitHub Desktop.
require 'uri'
require 'openssl'
cipher = OpenSSL::Cipher.new('BF-CBC')
cipher.iv = '12345678'
cipher.key = 'secret'
cipher.padding = 0
data = URI.decode('G%A1%CB%7C%CB%DA%00%E3%FDT%85%90%2C%FD%3F%C6%13%03b%F8%3F%FF%29%8D%1A%17%DE%14%C4E%12%D6%B4c%D6%22%F9%DC%CAd%21%FBP%E6%7F%917%F4E%95%E7%F8%26%F8%97%E5%A8Z9l%C3q%F1%FF%D0%FE%0A1%1F%F3M%220%7B%CD%A9Vyw%06')
str = cipher.update(data) << cipher.final
puts str
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment