Scroll to navigation

mobidrm(1) General Commands Manual (urm) mobidrm(1)

NAME

mobidrmUtility for decryption and encryption of MOBI format ebook files.

SYNOPSIS

mobidrm -d [-o dir] [-p pid] [-s serial] file

mobidrm -e [-o dir] [-s serial] [-f date] [-t date] file

mobidrm [-hv]

DESCRIPTION

The program encrypts or decrypts MOBI files with DRM schemes used on eInk devices. It is powered by libmobi library.

It may encrypt documents targeting particular device by using its serial number or applying generic DRM scheme targeting all supported readers.

Optionally encryption may be valid only during chosen period. Kindles require both start and end date to be set. This tool allows to specify only one date (start or end). In such case the other date will be automatically set to respectively lowest (1970-01-01) or largest (10136-02-16) valid value.

In case of hybrid files mobidrm separately encrypts both enclosed parts and produces two files: mobi for legacy format and azw3 for KF8 format.

The program also decrypts documents. One must supply device serial number or document PID if DRM was applied for specific device.

Invoked without arguments prints usage summary and exits.

A list of flags and their descriptions.

Decryption flags:

Decrypt. This flag must be set in order to decrypt document.
pid
Set optional decryption pid (may be specified multiple times).
serial
Set optional device serial number (may be specified multiple times).

Encryption flags:

Encrypt. This flag must be set in order to encrypt document.
date
Set optional validity period from date formatted as yyyy-mm-dd. Document will not be valid before this date.
serial
Set optional device serial number. If not set document will be encrypted with generic reader key. This flag may be specified multiple times to target multiple devices.
date
Set optional validity period to date formatted as yyyy-mm-dd. Document will expire after this date.

Common flags:

dir
Save output to dir folder.
Show usage summary and exit.
Show version and exit.

EXAMPLES

The following command decrypts document using given serial number. Decrypted output will be saved to /tmp folder.

% mobidrm -d -s B001XXXXXXXXXXXX -o /tmp example.mobi

The following command decrypts document trying multiple PIDs.

% mobidrm -d -p XXXXXXXXX1 -p XXXXXXXXX2 example.mobi

The following command encrypts document targeting two devices using their serial numbers. Document will be readable only on those devices.

% mobidrm -e -s B001XXXXXXXXXX01 -s B001XXXXXXXXXX02 example.mobi

The following command encrypts document for device wth given serial number. Document will only be valid within given period (inclusive).

% mobidrm -e -s B001XXXXXXXXXX01 -f 2021-01-01 -t 2021-01-31 example.mobi

RETURN VALUES

The mobidrm utility returns 0 on success, 1 on error.

COPYRIGHT

Copyright (C) 2021-2022 Bartek Fabiszewski.

Released under LGPL version 3 or any later (same as libmobi).

WEB SITE

Visit http://www.fabiszewski.net for details.

DIAGNOSTICS

For diagnostics libmobi must be configured with --enable-debug option.

SEE ALSO

mobimeta(1) mobitool(1)

February 16, 2022 Unix