

Amazon has demonstrated that they (unlike Adobe) take their DRM seriously: they've already pushed out a new version of K4PC which breaks this particular script. Version 6 cleanly handles already DRM-free files. Version 5 works with the new (20091222) version of the K4PC executable. Version 4 fixes an exception related to opening thread handles, detect Topaz format books, and detects that you have the proper version of Kindle For PC installed. Version 3 fixes an intermittent path-getting issue. It came to my attention that unswindle version 1 did not work if KindleForPC was installed as a non-administrator and did not work on versions of Windows other than XP. Don't use this to steal, or I'm taking my toys and going home. Script name in honor of rms and The Right to Read.

Put those kids together (in the same directory) and run unswindle.pyw. You'll also need a copy of darkreverser's mobidedrm (check the most recent comments for the newest links). So here you go: unswindle v7 (previous versions: v6 v5 v4 v3). Way to go Amazon! It's good enough that I got bored unwinding it all and just got lazy with the Windows debugging APIs instead. And they seem to have done a reasonable job on the obfuscation. K4PC uses the same encryption algorithms, but ups the ante with a per-book session key for the actual en/decryption. The Kindle proper and Kindle for iPhone/iPod app both use a single "device" encryption key for all DRMed content. Amazon actually put a bit effort behind the DRM obfuscation in their Kindle for PC application (K4PC).
