-
Notifications
You must be signed in to change notification settings - Fork 14
Home
In order to play a track, dzr will:
-
Fetch track information using at least one of following methods:
-
Find the track URL using the mandatory
DZR_AES
key -
Decrypt the track using the mandatory
DZR_CBC
key
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('')
✔️ Recommended
This method use the undocumented mobile endpoint api.deezer.com/1.0/gateway.php
which require an api_key
parameter.
To find the api_key
value examples, simply google for the previous url, and you shall find an api_key
example.
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
Specify the command that'll retrieve the track MD5:id
tuple.
RickRoll Resolver Example
The following script will resolve every track to the popular Rick Ashley song, for educational purpose.# save + chmod this line as "rickroll.sh" script:
>&2 echo resolving track $1 ...
echo 5e45db8562beee18000ba19b2480a6db:997764
Now try
# 42 or whatever track ID you want to be rick-rolled over
DZR_LUT="/path/to/your/rickroll.sh %s" dzr 42 | mpv -