Hacker Igor Skochinsky used DRM to load Mobipocket books onto his Kindle. Using a series of scripts, he's able to convert eBook files to Amazon's AZW format and then add the necessary serial number DRM, specialized per an individual's particular Kindle.
There are converters available from Amazon and/or Mobi for pdf and doc files.
The Kindle supports Mobipocket files directly. You don't need to write a script to do that.
The Kindle is already able to read more than just Amazon DRMed content, it can handle a number of formats.
A revolutionary portable reader that wirelessly downloads books, newspapers, magazines and blogs to a crisp, high-resolution electronic paper display that looks and reads like real paper, even in bright sunlight.