-
Notifications
You must be signed in to change notification settings - Fork 14
Home
Rémy F edited this page Mar 12, 2021
·
12 revisions
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
- download the latest deezer.android.app
- grep the key:
zipgrep -hoa '[0-9A-Z]{64}' deezer.*.apk classes.dex | grep -Pv '[0-9]{63}' | grep -Pv '[A-Z]{64}'
- if you don't have zipgrep (windows without WSL) : see instructions here.
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 -