Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. # To find `media_key` and `media_iv`, see: /bq/stories documentation
  2. import requests
  3. import base64
  4. import mcrypt
  5.  
  6. res = requests.post(...)  # POST /bq/stories and ensure res is a dict.
  7. data = requests.get(...)  # GET /bq/story_blob?story_id=XXXXX from result
  8. key = base64.b64decode(res[...]["media_key"])
  9. iv = base64.b64decode(res[...]["media_iv"])
  10.  
  11. m = mcrypt.MCRYPT("rijndael-128", "cbc")
  12. m.init(key, iv)
  13. dedata = m.decrypt(data)  # Boom.