-
Notifications
You must be signed in to change notification settings - Fork 14
Home
Rémy F edited this page Mar 5, 2020
·
12 revisions
In order to play a track, dzr will:
-
Fetch track information using one of the following methods:
-
DZR_API
: If defined, use the (semi-)official API to get track info -
DZR_SID
: If defined, use your private user Session ID (how to get it) -
DZR_LUT
: If defined, dzr will use an external resolver to get track information (example)
At least one of them need to be defined, otherwise dzr won't start.
-
-
Use this track information to find the track URL
- To do that
DZR_AES
is necessary and dzr won't boot if this key is not specified (how to get it)
- To do that
-
Fetch the track URL and decrypt it
- To do that, the
DZR_CBC
key is necessary and dzr won't boot if this key is not specified (how to get it)
- To do that, the
To get your Session ID, look at the network
request panel of your browser debugger
and you shall see a Set-Cookie line with sid=yoursidnumber
Used for URL Generation
- Go to the "source" panel of browser debugger, to show the deezer webworker source code
- pretty print the source
- put a breakpoint on the latest occurrence of the "JSON" word
- Play a new track, to trigger the breakpoint
- You see the keys in the the current scope
[...key].map(e=>String.fromCharCode(e)).join('')
Used for track deciphering
Same method as the DZR_AES, but the CBC keys are split in 2 arrays that need to be reassembled using the following script
a=[97, ... 103]
b=[49, ... 52]
[].concat(...a.map((c,i)=>[a[i],b[i]]).reverse()).map(e=>String.fromCharCode(e)).join('')