Friday, May 28, 2010

Unskindle- A Step by Step Guide

As many of you are aware of [and those who aren't], Unswindle.pyw is no longer working with the new version of K4PC. [as of May 20th anyway]. While you can work around it with installing an older version of K4PC, you have to delete the new one, delete all files relative to it [ie, my kindle folder, etc] and turn off autoupdate. And I can guarantee that K4PC will eventually force you to update anyway :-)

So, Unskindle is still working. Download it HERE or HERE. Install to C:\skindle. Makes life easier, trust me.

Now, to de-drm your mobi, azw or prc book.


skindle [-d] [-v] -i -o [-k kindle.info file] [-p pid]

-d optional, for topaz files only, produce a decompressed output file
-i required name of the input mobi or topaz file
-o required name of the output file to generate
-k optional kindle.info path
-v dump the contents of kindle.info
-p additional PID values to attempt (can specifiy multiple times)

So to decode a non-Topaz file you should do the following:

1. In Windows, create a new folder and copy in the skindle.exe program, and copy in the book you want to remove the drm from

2. open a terminal (run command.exe) and use the cd command to change directories to your new folder (the one with skindle.exe and the book in it).

3. type in the following command line

skindle -i NAME_OF_INPUT_FILE -o NEW_NAME_FOR_OUTPUT_FILE

replacing NAME_OF_INPUT_FILE and NEW_NAME_FOR_OUTPUT_FILE as appropriate and it should do the rest.



And now an example:

1. If you are using Windows, create a separate directory for skindle such as C:\skindle

2. Copy the book you want to work with into this same directory. Looks like this: Superbook.azw

3. Open a dos window. Start – All Programs – Accessories – Command Prompt

4. go to the skindle directory. CD C:\skindle

5. To convert type as follows:

skindle -i superbook.azw -o superbook1.azw For non-Topaz

skindle -d -i suckerbook.tpz -o suckerbook1.tpz For Topaz

Output file name must be different from input name and no spaces are allowed in the file names.



Finally, to convert azw files to other formats, simply use Calibre, a free ebook manager that also allows you to change the formats of your drm-free ebooks quite easily.

54 comments:

Derrick said...

As to why Unswindle has been superceded by Skindle, someone over on Dark Reverser's Blog had this to say:


"> think some people saw the DRM formats as an
> intellectual challenge to figure out. Once they
> figured it out and released the tools as they
> now exist they have moved on to other
> challenges. So there is little support for the
> programs outside of the postings here and on
> a few other similar sites.

In general I agree with most of what you say but I think “need” is also a factor. Given skindle exists and works, there is little need for an update to unswindle so their is less interest in supporting it given a solution already exists.

You will find lots of support for ereader to pml and html, mobidedrm, and the topaz tools on this list, simply ask. There is also active support for the inept tools by others who have picked up that banner (see Apprentice Alf’s blog for links to all of these).
And the B&N epub (ignoble tools) work on all platforms (use keygen now for Mac, Linux, and Windows and you can find people willing to help with those tools on this list as well.

It is just that unswindle is kind of superceded by skindle in that unswindle needed to patch the K4PC binary and skindle does not, which makes it more robust in the end. The full source code for skindle exists and it would be almost trival for some good python programmer to convert unswindle.py to use the same approach to get the book pid as is done in skindle if someone wanted to volunteer.

That said, a more important contribution would be to work on either of these projects:

1. convert skindle to work with Kindle4Mac for Mac users

2. work on the FairPlay DRM being used by Apple/iBooks"

jimtino said...

Sadly, I cannot seem to get calibre to open the book after I unskindle it. I receive an error from mobidedrm saying "Couldn't decode: c:\......" importing encrypted version. The file extension for the amazon book is .prc. The output from unskindle says that it found a drm key and that it was successful.

msmdh said...

Works flawlessly. I used the most recent version of Kindle2desktop software. Thanks a million!

oldauzzie said...

While unskindle appears to convert .azw files to .mobi files, I can't then convert to epub using "calibre" nor can I read the .mobi file using the "calibre" reader. UnicodeDecodeError:'utf8' codec can't decode byte 0x87 in position 19: unexpected code byte

jimtino said...

OK, I'm still lost. I think I was successful in running skindle. I received a message saying "...Success! Enjoy!" but when I open up calibre and try to import the book I get a dialog box (from MobiDeDrm I think) saying "Couldn't Decode: .azw. Importing Encrypted Version. Does anyone have any suggestions. I legitimately bought this ebook from Amazon but I would like to read it on my sony reader. Thanks.

Derrick said...

Ok. For those having problems, head on over to Apprentice Alf's Blog and ask the technical questions there. He and others are pretty good with figuring out problems:

http://apprenticealf.wordpress.com

Anonymous said...

Fantastic! Was struggling wit unswindle and could not convert a book to save my life. This skindle works great and I was able to move a kindel book to my Soney Reader. No more paying the higher prices at the Reader Store!

phyllis said...

Thank you so much!!!!! ^_^ It works fine on my new version of k4pc.

Darsh said...

I have the same problem jimtino did, I can get my file supposedly decrypted with a "success" message but when I bring it into calibre it says its still encrypted :(

openguy said...

To Darsh, are you sure you are moving the new unencrypted file to Calibre? Make sure that the output file is the one you are moving to Calibre.

rachell said...

I can not thank you enough for this!!! There have been many books I've been lusting over that are only available from Kindle (I don't mind paying, but I want to read it on my Pocket PC) and was SOL . . . until now. Thank you, thank you, thank you! ;)

Anonymous said...

After running the script the message says "success! enjoy!" but the output file is corrupted. The original azw is fine but the mobi file is corrupted. bummer - Amazon does have a good selection.

Anonymous said...

i am attempting to use the command prompt and i put in the data, and it keeps saying:
attemping to find kindle.info
Found kindle.info location
filename bad open, quitting.
what am i doing wrong?

Derrick said...

Anon1-sometimes Skindle will corrupt the azw file. I suggest heading over to Apprentice Alf's and downloading the latest Unswindle [I get lost with all the works/doesn't works updates that keep happening]

Anon2-perhaps it is a topaz book? Do a screen shot and post it over at Apprentice Alf's under the appropriate post [ie, Skindle] and someone will be able to help you out.

Anonymous said...

Thank you so much for posting this guide on Unswindle! I searched for days thinking that cracking the Kindle DRM was impossible. Now, I can read my Kindle download on my ereader device (Augen's "The Book"). Thanks again!

Anonymous said...

Darsh said...
I have the same problem jimtino did, I can get my file supposedly decrypted with a "success" message but when I bring it into calibre it says its still encrypted :(

..............
had the same problem, but used older versions of calibre i.e. 0.5.2 or stanza for desktop (my is windows xp) etc. and it was ok. undrm-ed azw read and converted to epub.

i guess newer versions read metadata or whatever and do not allow file to be opened because of agreements between companies.

bj20_0 said...

I need more step-by-step!
Downloaded skindle-06, unzipped
and only could find skindle.c, a
c source file obviously.
Help! bill
bj20_0@yahoo.com

shaun said...

This worked really well for me. I own a bunch of books bought on Amazon and used to read them on my pc before buying the ARchos 7 for Christmas.
Only thing I did different was:
instead of this
skindle -i superbook.azw -o superbook1.mobi

I did
skindle -i originalbooktitle.azw -o newbooktitle.azw

Then I opened it up in Calibre and right click and convert to epub. Placed this in sdcard/ebooks/import folder of Archos 7 then unplugged usb loaded Aldiko and imported book. It worked excellently. I now have some of my Amazon Kindle books on my Archos and on my computer too.

Thanks Skindle and all who make it possible.

Derrick said...

Hey Shaun,
thanks for the headsup. Having never actually used Skindle, real life data like yours is good!

James said...
This comment has been removed by the author.
Agnes said...

Derrick --

what a FANTASTIC POST!!!! Thank you thank you thank you!! I have been searching for days on how to un-DRM my Kindle books so i can read them on i-books for the ipad, which has a much better interface than kindle for ipad!

(I even got hit by malware from a fake book site -- WORLD OF BOOKS, with url "worid of books" -- when I was trying to find a solution.

Your instructions were perfect, easy, AND VERY SUCCESSFUL!!

Thank you!

DRM is really objectionable. I BOUGHT the book from Amazon. Why can't I be allowed to read and convert it for ibooks? i wish these greedy publishers/sellers address this. I don't mind if they give you a password or code or key when you buy the book, that will enable you to convert it, BUT they should do something!!

Those books aren't cheap... at least we should be allowed to enjoy them anyway we want when we've forked over good money to buy them.

You are a lifesaver!!!!

bigantuk said...

Great post. DRM on ebooks I have paid for is really annoying. You can't even copy books from PC to Kindle - you have to download separately for each registered account! I have tried for ages to find a way to remove the DRM but not found one until now which works on either newer PC Kindle or or Kindle 3. I have tested this and works great.

Anonymous said...

u like cracking topaz drm? u dont need the device key anymore. http://pastebin.com/GvQMw18w

take a l00k! its in a b00k

Ali Oop said...

Some people seem to be having the same trouble I did, so I'll post some tips that might help you get through the errors.

First, if you downloaded your book directly from the Amazon.com website using the USB option (I didn't even have Kindle For PC installed), try re-downloading your book through the Kindle For PC program. The program tells you how to do it, and it's free. It might help with books sent through WhisperSync too. This should eliminate any invalid or missing PID errors.

When you copy your original .azw file into the Skindle.exe folder, rename it to a nice, short one-word name, which makes typing it all in easier, and you can add a number 2 to the output .azw to help you keep track of the converted file. [Example: -i book.azw -o book2.azw]

Next, as someone else suggested, don't convert while you're decrypting. Do a .azw to .azw pass. It's easier to use programs like Calibre (for most eReaders) to convert to other formats, and lessens the chance for random errors.

These simple things solved all of my problems.

Derrick said...

Ali,
thanks for the headsup about azw to azw instead of to mobi.

I'll change the post to reflect that.

Anonymous said...

Be aware that the skindle code doesn't work correctly on some Kindle/Mobipocket ebooks. (It will appear to work, but is based on an old version of MobiDeDRM and doesn't handle the boundary between sections in the file correctly, resulting in some corrupt character spread throughout the book text.)

The best Kindle De-DRM tools are currently available from Apprentice Alf's blog

http://apprenticealf.wordpress.com/

and include calibre plug-ins, drag&drop solutions for Mac and Windows, GUI python programs and th basic pythons scripts, along with detaled installation and use instructions.

Alf's retired now, but the blog is still there.

Anonymous said...

Great post. Can this somehow be made into a plugin for Calibre, in the same way some of he deDRM tools have? that would be the ultimate in convenience. But thanks for this great tool.

Derrick said...

Hey Anon,
there already is a fantastic plugin for calibre.
Here is the blog post describing it and instructions:
Calibre Plugin

Mark Woodard said...

I have tried unskindle (3 Jan 2010 version) without success in both the Windows XP and Ubuntu OS. Also tried unswindle (24 Jul 10 version). I have an azw book purchased from Amazon that I wish to read on my Kobo.

I downloaded the K4PC app just yesterday (8 Mar 2011); have they updated the K4PC app?

Mark Woodard said...

OK, more technical detail if anyone is out there. For unswindle, I am using python 2.6 and the most recent version of unswindle that I can find, and get the error message: 'error: unsupported version of K4PC.'

For Skindle, I get the message: 'Attempting to locate kindle.info' and then I get the Microsoft crash notice. When I choose not to send a message to MS, the command line entry: 'Found Kindle.info location' is made, but the program stops.

I have tried Skindle in ubuntu using the same syntax as above, but I get the message 'command not found' and some suggestions to download a package; it doesn't appear that Skindle is compiled to run on Ubuntu/linux environment.

Can someone please help? This is annoying me to no end...

Thanks

Derrick said...

Mark- I suggest heading over to Apprentice Alf's [apprenticealf.wordpress.com]
and asking over there.

Reverse engineering and techy people hang out there and should be able to help you out.

Just post what you did here under the Kindle subpost.

Hope you find some help...

Mark Woodard said...

Derrick: many thanks. Apprentice Alf's blog, however, is closed. Other suggestions most welcome.

wrexy said...

Thank you for the Nice and Slow way to crack my Kindle books drm. Long time since I've used a DOS screen! Many thanks Mary-Lyn WA

livst said...

I've just tried to remove the DRM from an .azw kindle book, but I keep getting the same error. It says it finds the kindle.info location, but then it says "MOBI BOOK is not encrypted" and "Failed to read mobi headers", "An error occured, unable to process input file!"

Help? :S

Derrick said...

Mark-sorry it has taken me so long to respond. I hope you find this:
look up and ask your question at Dark Reversers Blog. Tons of comments [over 1200 now I think] but they do answer and I am pretty sure they are still up.

Livst-it sounds like your book isn't drm'd. try converting it to mobi in calibre and see if it can.

AnonymousPC said...

To jimtino and other who have this message in calibre - "Couldn't decode: c:\......" importing encrypted version", this is what you need to do:

Important thing! You have to use book from Kindle4PC, not from your Kindle device.

1.Use skindle to decrypt files (rename book to "book.azw" and output file to "book1.azw")

2. Add "book1.azw" to calibre - newest version

3. Ignore message "Couldn't decode: c:\......" importing encrypted version error"

4. Don't click to open "azw" file.

5. Click "c" to convert book in calbre - choose "mobi" as output format then click "ok".

6. After that you should be able to open your mobi file (then you can convert to any format calibre allows you).

7. Enjoy your book.

Hope my suggestions were helpful!

PS. To author of script - this is awesome. I have tried unswindle and other scripts and nothing worked with me. You are great. Thanks!

Anonymous said...

After trying every other method and suffering through numerous errors I found your post, tried it, worked first time. All I wanted was to print out sections of a study guide I had purchased so I could read it while at the gym, pool etc. Woked perfectly, thanks a bunch.

KCM

Anonymous said...

I've successfully de-DRMed a number of files I purchased for my Kindle. Only a couple gave me problems.

However, I just updated my version of Kindle for PC, and the last few books I've downloaded since have NOT successfully converted.

I get "Kindle.info found", then
"BuildKindleMap failed" and skindle terminates.

I tried to verify the location of my kindle.info file. The folder is there, but it's empty, so I'm not sure what file skindle is locating, or if it's no longer valid with the new version.

Help!

Anonymous said...

Hi All,

My problem is exactly the same as the last blogger with an identical message, ie. basically although it finds the kindle.info file it cannot create the BuildKindleMap and then the program terminates.
As with the last post, someone please help...

Derrick said...

Last 2 anons:

K4pc updated to ver1.5. It makes all previous de-drm tools useless. So far, no updated tools that I'm aware of.

Here's a dirty work-around:
google and download k4pc 1.4.
save it just in case you need it in the future.
Uninstall k4pc.
Re-install k4pc, but using the older version you downloaded.
Once installed, find in the settings and turn OFF "auto-update".
Redownload your books, and you "should" be good to go.

Hope that helps...

Anonymous said...

The latest tools linked from Apprentice Alf's blog work with Kindle for PC 1.5.0.

Apprentice Alf has retired, but his blog goes on. Comments are allowed on the first post.

Anonymous said...

I've done everything I can but so far I'm still stuck. Please help. Here's the message that I get:

Attempting to locate kindle.info
Found kindle.info location
Using UserName = "Odd Thomas"
Using SystemDrive = "E:\"
Using VolumeSerialNumber = "482142543"
Device PID: ITFS15KV
Failed to find map node: AbaZZ6z4a7ZxzLzkZcaqauZMZjZ_Ztz6
PID for is: 9feT8vjf
No valid pids available, failed to find DRM key
An error occurred, unable to process input file!

Derrick said...

Anon-update your tools and if that doesn't work, do what I keep telling EVERYONE to do, go over to Alf's.

And be prepared for no more tools. Amazon is closing in on making their drm not worth breaking.

ACTONE said...

Awesome! Now I can utilize my spare time on the run with my textbook on my Iphone! Thanks a bunch!

Anonymous said...

Amazon just put out a new kindlePC that broke this.

Anonymous said...

yep, new kindle pc broke this

Anonymous said...

Its wastage of time and money. There is no tool available to decode the latest kindle books, if you are not owner of that book.

Derrick said...

Latest Anon,
You, Sir or Madam, are a complete IDIOT!!!!

There is no money involved.

And second, and more importantly, OF COURSE THERE ARE NO TOOLS TO BREAK THE DRM OF OTHER PEOPLES BOOKS!!!!!!!!!!!!!1

These tools are so you, the owner of the book, can have control like you are supposed to.
They are NOT so you can go around stealing books or putting them up on torrent sites.

donne said...

Thanks, this is in every respect what I need to know. I wish you all the best.

Anonymous said...

AZW doesn't work D:

Anonymous said...

And now an example:

1. If you are using Windows, create a separate directory for skindle such as C:\skindle

2. Copy the book you want to work with into this same directory. Looks like this: Superbook.azw

3. Open a dos window. Start – All Programs – Accessories – Command Prompt

4. go to the skindle directory. CD C:\skindle

5. To convert type as follows:

skindle -i superbook.azw -o superbook1.azw For non-Topaz

First of all, I must tell you that I'm not familiar with using the Command Prompt, so I need some help with the way I have to write the commands in the Command Prompt. I understand and followed the first 3 steps above, but I'm not sure about the step 4. Do I need to put a space before I type "CD C:\skindle"? And after I typed that, do I need to put a space before I type "skindle -i superbook.azw -o superbook1.azw"? Please help me! Thanks!

Coffee Addict said...

FWIW, I'm still using Unswindle and it's still working just fine. Yesterday I bought and decoded a book released this year, so the DRM technique doesn't seem to have changed a bit since the original release of these scripts. However, you do need to use an older version of KindleForPC in order for Unswindle to work. I've uploaded the version that I use, KindleforPC v1.0.1, on the below link:

https://rapidshare.com/files/3119892269/KindleForPC-installer.exe

And below is the whole Unswindle package needed to decrypt Kindle books, for those interested (KindleForPC v1.0.1 + Python v2.7 + .py script files to put in root Python folder):

https://rapidshare.com/files/811376584/Unswindle.rar

The instructions are as follows: Install KindleForPC and Python, then copy the two .py files to the Python directory. To decrypt a book, double-click on Unswindle.py, which will launch KindleForPC, open the book to be decrypted, click a few pages into the book and close KindleForPC. Now Unswindle.py will ask you where to save the book, choose a name for the book and save it.

Unswindle doesn't tell you what format the book is, so you'll have to guess the extension and then try it out in your ebook readers. The most common formats are EPUB and MOBI, Calibre is a great freeware tool which will help identify the format if unclear as well as convert it to another format of your choice (I always convert MOBI to EPUB using Calibre).

BTW, I'm not sure about the purpose of the MobiDeDRM.py script, because it's not referenced in the Unwindle.py script which you use to launch and decrypt the books, but the original instructions (included as Instructions.txt) said to copy both .py files to the Python folder, so do that just to be on the safe side.

Also, on my system (Windows 7 SP1, x64 version) KindleForPC v1.0.1 doesn't seem to want to launch when double-clicked, but it opens and runs flawlessly when launched by the Unswindle.py script. This doesn't bother me much though as I basically only use KindleForPC in order to decrypt Kindle books, which I then read using other utilities, but I just thought I would mention this in case anyone else notices that the program doesn't seem to work as expected.

Anonymous said...

Coffee.... Thanks for the post, works perfectly.

CoffeeAddict (forgot my password) said...

I decided to remove the above links, since I've found a better and more stable solution that works with the latest Kindle for PC versions and a whole range of other DRM formats out there.

Just download this guy's script:

http://apprenticealf.wordpress.com

Of course, like with all other method(s), this one also requires Python as well as a Python extension called PVCrypto. There are links to both on the above page.

If you're unsure what/where/how to do this, I've uploaded both installers on RapidShare:

http://rapidshare.com/files/2668285745/ActivePython-2.7.2.5-win32-x86.msi
http://rapidshare.com/files/2304217018/PYCrypto-2.1.0.win32-py2.7.exe

...and after you've installed these two prerequisites, either download the script from the author's page above as a ZIP archive or download this simple Windows installer that I've created for v6.0.5 of the script (you may want to check his website for later versions, though):

http://rapidshare.com/files/110924794/DeDRM%20v6.0.5%20for%20Windows.exe

This very basic installer will copy the script to C:\DeDRM\ and install a "Send-To" shortcut in the context menu that can be used to decrypt files using the context menu. If already installed, this same installer will when run uninstall and remove the directory and "Send-To" shortcut.

Followers