Python tool and library for decrypting encrypted MS Office files with a password
Project description
msoffice_decrypt
================
msoffice_decrypt is a Python tool and library for decrypting encrypted
MS Office files with a password. This work is based on
https://github.com/nolze/msoffcrypto-tool. I created this project to
solves a specific use case for myself.
Installation
------------
Stable release
~~~~~~~~~~~~~
::
pip3 install -U msoffice_decrypt
From GitHub
~~~~~~~~~~~
::
pip3 install -U git+https://github.com/unixfreak0037/msoffice_decrypt
Examples
--------
(command line) Decrypt a file with a password.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::
msoffice_decrypt -p 7779 Scan_ciwilson.doc Scan_ciwilson_unencrypted.doc
::
decrypted Scan_ciwilson.doc into Scan_ciwilson_unencrypted.doc
(command line) Decrypt a file trying everything that might be a password in this other file.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::
msoffice_decrypt -i sample.txt Scan_ciwilson.doc Scan_ciwilson_unencrypted.doc
::
found password: 7779
decrypted Scan_ciwilson.doc into Scan_ciwilson_unencrypted.doc
(library)
~~~~~~~~~
.. code:: python
from msoffice_decrypt import MSOfficeDecryptor
decryptor = MSOfficeDecryptor(input_file_path, output_file_path)
if decryptor.is_decryptable:
# generate a list of passwords that might be right
# here we assume sample.txt is a text file that contains the password somewhere
with open('sample.txt', 'r') as fp:
word_list = decryptor.find_password(fp)
# see if any of these passwords are correct
password = decryptor.guess(word_list)
if password:
decryptor.decrypt(password)
================
msoffice_decrypt is a Python tool and library for decrypting encrypted
MS Office files with a password. This work is based on
https://github.com/nolze/msoffcrypto-tool. I created this project to
solves a specific use case for myself.
Installation
------------
Stable release
~~~~~~~~~~~~~
::
pip3 install -U msoffice_decrypt
From GitHub
~~~~~~~~~~~
::
pip3 install -U git+https://github.com/unixfreak0037/msoffice_decrypt
Examples
--------
(command line) Decrypt a file with a password.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::
msoffice_decrypt -p 7779 Scan_ciwilson.doc Scan_ciwilson_unencrypted.doc
::
decrypted Scan_ciwilson.doc into Scan_ciwilson_unencrypted.doc
(command line) Decrypt a file trying everything that might be a password in this other file.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::
msoffice_decrypt -i sample.txt Scan_ciwilson.doc Scan_ciwilson_unencrypted.doc
::
found password: 7779
decrypted Scan_ciwilson.doc into Scan_ciwilson_unencrypted.doc
(library)
~~~~~~~~~
.. code:: python
from msoffice_decrypt import MSOfficeDecryptor
decryptor = MSOfficeDecryptor(input_file_path, output_file_path)
if decryptor.is_decryptable:
# generate a list of passwords that might be right
# here we assume sample.txt is a text file that contains the password somewhere
with open('sample.txt', 'r') as fp:
word_list = decryptor.find_password(fp)
# see if any of these passwords are correct
password = decryptor.guess(word_list)
if password:
decryptor.decrypt(password)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
msoffice_decrypt-1.0.0.tar.gz
(10.3 kB
view details)
Built Distributions
msoffice_decrypt-1.0.0-py3.6.egg
(15.4 kB
view details)
File details
Details for the file msoffice_decrypt-1.0.0.tar.gz
.
File metadata
- Download URL: msoffice_decrypt-1.0.0.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.10.0 pkginfo/1.2.1 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3ba837102b66abcf4264ef74c08b1b2dc320b9e26adac7f63faa02ec1937831 |
|
MD5 | fbbafc718dc7313deede4619685a5f62 |
|
BLAKE2b-256 | 09d6135b7cffa1af668665bfcc79492f62e0ede34864a0574bd71cad75a8517e |
File details
Details for the file msoffice_decrypt-1.0.0-py3.6.egg
.
File metadata
- Download URL: msoffice_decrypt-1.0.0-py3.6.egg
- Upload date:
- Size: 15.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.10.0 pkginfo/1.2.1 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5adc7813ca26183423ba934d7a055f1e4de0ed33fae85ea7888954b402741eb |
|
MD5 | 1ad0004e70bf7ae1dc3fb29aa5a033c5 |
|
BLAKE2b-256 | cee4c8642dcb5e065eed8e00dadb9a5afacef09c96a7616d858e10fa07e576ef |
File details
Details for the file msoffice_decrypt-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: msoffice_decrypt-1.0.0-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.10.0 pkginfo/1.2.1 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 901c9b3aecc2360a041dbe332681d9c1ea306298f0645f12018f2758db4e0f84 |
|
MD5 | a290c81ebf7daab43216611e74e426e2 |
|
BLAKE2b-256 | 92c41f1cb03c6e21d6975b9a0ee532cf5e31c7388ec3a0108abbcc26db9ab055 |