Advertisement
pintcat

Play DRM protected audio files from Audible with ffplay, ffprobe & rainbowcrack

Apr 23rd, 2021 (edited)
373
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.72 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. PARRENT=$(pwd)
  4.  
  5. printf "Cracking Audible's DRM encryption... "
  6.  
  7. HASH=$(ffprobe $1 2>&1 | grep 'file checksum == ' | awk -F ' == ' '{print $2}')
  8.  
  9. cd ~/rainbowcrack
  10. unzip -q -d /media/ramdisk/ tables.zip
  11. CODE=$(./rcrack /media/ramdisk/ -h $HASH | grep 'hex:' | awk -F ':' '{print $2}')
  12. rm -drf /media/ramdisk/tables
  13. printf "Your activation code is: \033[0;31m$CODE\033[0m\nStarting playback...\n"
  14. cd $PARRENT
  15. ffplay -activation_bytes $CODE $1
  16.  
  17. # Simple command line to remux DRM protected Audible files and remove DRM-protection (XXXXXXXX must be replaced with the given activation code):
  18. # ffmpeg -y -activation_bytes XXXXXXXX -i infile.aax -map_metadata 0 -id3v2_version 3 -codec:a copy -vn outfile.m4b
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement