Last active
August 13, 2023 20:23
-
-
Save jamescmartinez/6913761 to your computer and use it in GitHub Desktop.
Snapchat Image Decrypt - This Ruby script decrypts the blob received from the `bq/blob` endpoint. Many thanks to @kivikakk, @adamcaudill, @tlack, and @NeilHanlon for inspiration, code, guides, and of course, the encryption key.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'openssl' | |
data = File.open('blob', 'r:ASCII-8BIT').read | |
c = OpenSSL::Cipher.new('AES-128-ECB') | |
c.decrypt | |
c.key = 'M02cnQ51Ji97vwT4' | |
o = ''.force_encoding('ASCII-8BIT') | |
data.bytes.each_slice(16) { |s| o += c.update(s.map(&:chr).join) } | |
o += c.final | |
File.open('blob.jpg', 'w') { |f| f.write(o) } |
Please help me
I do not understand much about these matters
What should I do with this code?
@jamescmartinez
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The blob files are no longer encrypted, you just have to add the extension .jpg