Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Note that playlist audio is XOR encrypted #40

Open
hacker1024 opened this issue Sep 1, 2020 · 2 comments
Open

Note that playlist audio is XOR encrypted #40

hacker1024 opened this issue Sep 1, 2020 · 2 comments

Comments

@hacker1024
Copy link
Contributor

hacker1024 commented Sep 1, 2020

I don't have time to write this up properly now, but I will later. Making this issue to record my findings in the meantime, as this isn't documented.

Pandora playlist audio is encrypted with a base64 encoded string, assigned to the key key in the response JSON.
Audio can be decrypted for testing using this tool.

For reference, Pandora's implementation in their web app can be found in the Javascript code for the Sirius XM music player, at webpack:///src/domains/playback/audio/libs/AudioPlayback/harnesses/SXMHarness/SXMAudioPlayer.js in the browser debugger.

Specifically, this code snippet revealed the secrets:

startLoading: function (url, key) {
    this._url = url;
    this._load = new ProgressiveDownload(url);

    //TODO : IF we have key initiate the XORCipher to decrypt the buffer data usign the key
    if(key)
    {
        this.key = key;
        this._cipher = new XORCipher(Cipher.ALGORITHM.XOR_MASK, ["decrypt"]);
        this._cipher.importKey(key);
    }
},
@PromyLOPh
Copy link
Owner

This is true for the REST API, right?

@hacker1024
Copy link
Contributor Author

Yup. Another thing I've found is that it uses an uncommon m4a codec that's causing trouble on pretty much any platform my app runs on (Android, iOS, and macOS), though VLC can handle it just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants