Decryption
Removes known passwords from PDF, Word, Excel and PowerPoint files, writing unlocked copies and reporting which password number opened each file.
Decryption tries each password you give it, in order, on every PDF and Office file in the input folder. When one works, an unlocked copy is written to the run folder with the same name and folder, and the report gives the number of the password that worked (1, 2, 3…), never the password itself. Passwords are used for this run only: they are not saved in the manifest, job file, reports or error log.
How a file is unlocked depends on its type. Encrypted .docx, .xlsx and .pptx files are decrypted directly, without Office, so the unlocked copy is exactly the document that was encrypted. Older .doc, .xls and .ppt files are opened in Microsoft Office from a working copy, with macros disabled, and saved again without a password; Office must be installed for these. PDFs are saved without encryption; the Details column says if anything had to be left out.
Use it when
- A collection or production contains password-protected documents and the passwords have been provided.
- Extract Text, Search, OCR or Convert To PDF report files as password-protected.
- PDFs open without a password but block printing or copying, and you need unrestricted copies.
How to run it
- Choose the folder of documents as Input.
- Choose an Output folder outside the input folder.
- Type the known passwords into passwords, one per line, exactly as given (letter case and spaces count). Add a password-file if you have a longer list.
- Turn on copy-unencrypted if you want the output folder to hold the whole set, not only the unlocked files.
- Close PowerPoint if you have it open and the set includes older
.pptfiles. - Click Run, then click Open report and filter the Status column.
- Use the unlocked copies in the
filesfolder for processing.
Settings
Every setting has the same help beside it in the app. On the command line, pass each as --name value; ltk help decrypt lists them.
Settings
| Setting | What it does | Type and default |
|---|---|---|
Passwords--passwords |
Passwords to try, one per line, used exactly as typed. They are numbered 1, 2, 3… in this order; the report says which number worked. Used for this run only: never saved in the manifest, job file, reports or error log. On the command line, use password-file instead: command lines can be seen in the process list and in shell history. Each line is one password, used exactly as typed; only empty lines are ignored. The order matters only for the numbering in the report, so keep a note of your list outside the tool if you need to record which password opened which file. |
text (lines) empty |
Password file--password-file |
Optional text file with more passwords, one per line, numbered after the typed ones (UTF-8 or Windows-1252; detected automatically). Only the file's location is recorded, never its contents. A text file with one password per line; its passwords are numbered after the typed ones. On the command line, always use this rather than passwords, because command lines can be seen by other programs and kept in shell history. Only the file's location is recorded. |
file empty |
Copy unencrypted--copy-unencrypted |
Also copy files that are not encrypted (unchanged, hash-verified), so the output folder holds the complete set. Off by default: files that are not encrypted are listed as Not encrypted but not copied. On: they are copied unchanged and hash-verified, so the output folder is a complete working set. |
yes/nofalse |
Time limit (seconds)--timeout-seconds |
If Office takes longer than this on one document, the Office copy this tool started is stopped, the document is reported as Timeout, and Office is restarted for the next document. Applies only to the older Office files that are opened in Office. If Office takes longer than this on a document, the copy of Office the tool started is stopped and restarted for the next document. |
number120 |
Common settings
| Setting | What it does | Type and default |
|---|---|---|
Input required--input |
Folder (or single file) to read. It is opened read-only and never modified. | folder empty |
Output required--output |
Folder for reports. Must not be inside the input folder. Each run gets its own sub-folder. | folder empty |
Recurse--recurse |
Include sub-folders. | yes/notrue |
Extensions--extensions |
Only process these extensions (e.g. .pdf, .docx). Empty means the tool's default set. | list empty |
Parallelism--parallelism |
Files processed at once. Use 1-2 for spinning disks or network shares. | number4 |
What you get
Each run creates its own folder inside the output folder, with the report decrypt.csv, errors.csv and manifest.json (see Run folders and manifests).
files\…: Unlocked copies (and, with copy-unencrypted, unchanged copies of the other files), with the same names and folders as the input and the original file dates.decrypt.csv: One row per file: FileType, Status (Decrypted,Not encrypted,Copied (not encrypted),Error,Use Extract ArchivesorNot supported), PasswordNumber, Details and Destination.errors.csv: Files whose Status isError, such as those no password opened, with a short reason.
Report columns
RelativePathFileNameFileTypeStatusPasswordNumberDetailsDestinationSourcePath
Check the result
- Filter Status for
Error.No password worked.means none of the passwords opened the file; get the right password and run again on those files. - Read Details for PDFs. If only the open password was supplied, or the PDF only restricts printing or copying, the pages are copied into a new PDF and embedded files, bookmarks and form fields are dropped.
- Read the notes. Older Office files unlocked by Office have internal metadata such as last saved by and dates that reflect this run.
- Look for
Not supportedrows, which include older Office files that could not be opened because Office is not installed or PowerPoint was already open.
- A workbook encrypted with Excel's built-in default password opens without one; the tool unlocks it and says so in Details.
- Password-protected ZIP files are not handled here: use Extract Archives, which takes a password.
- Unlocking a PDF with its permissions (owner) password re-writes it as it is, keeping its contents; digital signatures and earlier saved versions inside the file are not preserved.
- Rights-managed (IRM) Office files are not password-protected and cannot be unlocked with a password; they are reported as errors.
- Unlocked PDFs and older Office files are not byte-for-byte copies of the originals, so their hashes differ. Keep the originals and this run's report with the matter record.
- The free edition processes up to 25 documents per run.
From the command line
The command line is part of LitTechKit Pro. See Command line.
ltk run decrypt --input "D:\Matter\Collection" --output "D:\Matter\Unlocked" --password-file "D:\Matter\Secure\passwords.txt" --copy-unencrypted true
Related tools
- Extract Text: Extracts the text of PDF, Word, Excel, PowerPoint, email, RTF, HTML and text files into one UTF-8 .txt file per document, with page and sheet markers, and reports documents that need OCR.
- Convert To PDF: Converts Word, Excel, PowerPoint, RTF, text, email (.eml, .msg) and image files (including multi-page TIFFs) to PDF using the Microsoft Office on this PC, from read-only working copies with macros and external links disabled, keeping saved values and showing hidden content, and reports the page count of each PDF. AutoCAD drawings (.dwg, .dxf, R14 and later) are converted without AutoCAD, one page per layout.
- OCR (Searchable PDFs): Makes scanned PDFs and images (TIFF, JPEG, PNG) searchable with Windows' built-in OCR: an invisible text layer is added over each scanned page, so it looks the same but can be searched, selected and extracted. Pages that already have text are left alone. Images become PDFs. Works offline.
- Extract Archives: Extracts ZIP, 7z, RAR, TAR and GZ archives (including archives inside archives) into a new folder, with hash verification, original modified times and protection against damaged or malicious archives.