The native
Kindle format (azw) is in fact just the Mobipocket DRM format with a few extra flags/bits set (this has long been known). So if you know the PID of your Kindle (which you can get from the serial number in most cases) you can decrpyt them. So there is already a script that
converts AZW books to mobi format and then of course the mobidedrm script to decrypt them.