Hello community,
here is the log from the commit of package python-msoffcrypto-tool for
openSUSE:Factory checked in at 2020-04-15 19:57:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-msoffcrypto-tool (Old)
and /work/SRC/openSUSE:Factory/.python-msoffcrypto-tool.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-msoffcrypto-tool"
Wed Apr 15 19:57:11 2020 rev:3 rq:794207 version:4.10.2
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-msoffcrypto-tool/python-msoffcrypto-tool.changes
2019-09-13 14:58:27.273277582 +0200
+++
/work/SRC/openSUSE:Factory/.python-msoffcrypto-tool.new.2738/python-msoffcrypto-tool.changes
2020-04-15 19:57:13.717696335 +0200
@@ -1,0 +2,6 @@
+Wed Apr 15 13:57:30 UTC 2020 - [email protected]
+
+- version update to 4.10.2
+ * Make _packUserEditAtom spec-compliant
+
+-------------------------------------------------------------------
Old:
----
msoffcrypto-tool-4.10.1.tar.gz
New:
----
msoffcrypto-tool-4.10.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-msoffcrypto-tool.spec ++++++
--- /var/tmp/diff_new_pack.rLbXjt/_old 2020-04-15 19:57:14.605697002 +0200
+++ /var/tmp/diff_new_pack.rLbXjt/_new 2020-04-15 19:57:14.609697005 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-msoffcrypto-tool
#
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-msoffcrypto-tool
-Version: 4.10.1
+Version: 4.10.2
Release: 0
Summary: Library for decrypting MS Office files
License: MIT
@@ -30,6 +30,7 @@
BuildRequires: python-rpm-macros
Requires: python-cryptography >= 2.3
Requires: python-olefile >= 0.45
+Requires: python-setuptools
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module coverage}
++++++ msoffcrypto-tool-4.10.1.tar.gz -> msoffcrypto-tool-4.10.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/msoffcrypto-tool-4.10.1/PKG-INFO
new/msoffcrypto-tool-4.10.2/PKG-INFO
--- old/msoffcrypto-tool-4.10.1/PKG-INFO 2019-08-02 04:39:13.000000000
+0200
+++ new/msoffcrypto-tool-4.10.2/PKG-INFO 2020-04-07 20:56:12.000000000
+0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: msoffcrypto-tool
-Version: 4.10.1
+Version: 4.10.2
Summary: A Python tool and library for decrypting MS Office files with
passwords or other keys
Home-page: https://github.com/nolze/msoffcrypto-tool
Author: nolze
@@ -10,7 +10,7 @@
[](https://badge.fury.io/py/msoffcrypto-tool)
[](https://pypistats.org/packages/msoffcrypto-tool)
- [](https://travis-ci.org/nolze/msoffcrypto-tool)
+ [](https://travis-ci.com/nolze/msoffcrypto-tool)
[](https://codecov.io/gh/nolze/msoffcrypto-tool)
[](http://msoffcrypto-tool.readthedocs.io/en/latest/?badge=latest)
@@ -23,7 +23,7 @@
* [Supported encryption methods](#supported-encryption-methods)
* [Tests](#tests)
* [Todo](#todo)
- * [References](#references)
+ * [Resources](#resources)
* [Use cases and mentions](#use-cases-and-mentions)
* [Contributors](#contributors)
@@ -128,7 +128,7 @@
* [ ] Use a kind of `ctypes.Structure`
* [ ] Support encryption
- ## See also
+ ## Resources
* "Backdooring MS Office documents with secret master keys"
<http://secuinside.com/archive/2015/2015-1-9.pdf>
* Technical Documents
<https://msdn.microsoft.com/en-us/library/cc313105.aspx>
@@ -147,10 +147,12 @@
## Use cases and mentions
+ * <https://repology.org/project/python:msoffcrypto-tool/versions>
(kudos to maintainers!)
*
<https://github.com/jbremer/sflock/commit/3f6a96abe1dbb4405e4fb7fd0d16863f634b09fb>
* <https://github.com/dtjohnson/xlsx-populate>
*
<https://github.com/shombo/cyberstakes-writeps-2018/tree/master/word_up>
*
<https://isc.sans.edu/forums/diary/Video+Analyzing+Encrypted+Malicious+Office+Documents/24572/>
+ * <https://checkroth.com/unlocking-password-protected-files.html>
## Contributors
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/msoffcrypto-tool-4.10.1/README.md
new/msoffcrypto-tool-4.10.2/README.md
--- old/msoffcrypto-tool-4.10.1/README.md 2019-08-02 04:38:36.000000000
+0200
+++ new/msoffcrypto-tool-4.10.2/README.md 2020-04-07 20:55:40.000000000
+0200
@@ -2,7 +2,7 @@
[](https://badge.fury.io/py/msoffcrypto-tool)
[](https://pypistats.org/packages/msoffcrypto-tool)
-[](https://travis-ci.org/nolze/msoffcrypto-tool)
+[](https://travis-ci.com/nolze/msoffcrypto-tool)
[](https://codecov.io/gh/nolze/msoffcrypto-tool)
[](http://msoffcrypto-tool.readthedocs.io/en/latest/?badge=latest)
@@ -15,7 +15,7 @@
* [Supported encryption methods](#supported-encryption-methods)
* [Tests](#tests)
* [Todo](#todo)
-* [References](#references)
+* [Resources](#resources)
* [Use cases and mentions](#use-cases-and-mentions)
* [Contributors](#contributors)
@@ -120,7 +120,7 @@
* [ ] Use a kind of `ctypes.Structure`
* [ ] Support encryption
-## See also
+## Resources
* "Backdooring MS Office documents with secret master keys"
<http://secuinside.com/archive/2015/2015-1-9.pdf>
* Technical Documents <https://msdn.microsoft.com/en-us/library/cc313105.aspx>
@@ -139,10 +139,12 @@
## Use cases and mentions
+* <https://repology.org/project/python:msoffcrypto-tool/versions> (kudos to
maintainers!)
*
<https://github.com/jbremer/sflock/commit/3f6a96abe1dbb4405e4fb7fd0d16863f634b09fb>
* <https://github.com/dtjohnson/xlsx-populate>
* <https://github.com/shombo/cyberstakes-writeps-2018/tree/master/word_up>
*
<https://isc.sans.edu/forums/diary/Video+Analyzing+Encrypted+Malicious+Office+Documents/24572/>
+* <https://checkroth.com/unlocking-password-protected-files.html>
## Contributors
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/msoffcrypto-tool-4.10.1/msoffcrypto/__init__.py
new/msoffcrypto-tool-4.10.2/msoffcrypto/__init__.py
--- old/msoffcrypto-tool-4.10.1/msoffcrypto/__init__.py 2019-08-02
04:38:36.000000000 +0200
+++ new/msoffcrypto-tool-4.10.2/msoffcrypto/__init__.py 2020-04-07
20:55:40.000000000 +0200
@@ -2,7 +2,7 @@
import zipfile
-__version__ = "4.10.1"
+__version__ = "4.10.2"
def OfficeFile(file):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/msoffcrypto-tool-4.10.1/msoffcrypto/format/doc97.py
new/msoffcrypto-tool-4.10.2/msoffcrypto/format/doc97.py
--- old/msoffcrypto-tool-4.10.1/msoffcrypto/format/doc97.py 2019-08-02
04:38:36.000000000 +0200
+++ new/msoffcrypto-tool-4.10.2/msoffcrypto/format/doc97.py 2020-04-07
20:55:40.000000000 +0200
@@ -434,4 +434,16 @@
shutil.copyfileobj(_ofile, ofile)
def is_encrypted(self):
- return self.info.fib.base.fEncrypted
+ r'''
+ Test if the file is encrypted.
+
+ >>> f = open("tests/inputs/plain.doc", "rb")
+ >>> file = Doc97File(f)
+ >>> file.is_encrypted()
+ False
+ >>> f = open("tests/inputs/rc4cryptoapi_password.doc", "rb")
+ >>> file = Doc97File(f)
+ >>> file.is_encrypted()
+ True
+ '''
+ return True if self.info.fib.base.fEncrypted == 1 else False
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/msoffcrypto-tool-4.10.1/msoffcrypto/format/ppt97.py
new/msoffcrypto-tool-4.10.2/msoffcrypto/format/ppt97.py
--- old/msoffcrypto-tool-4.10.1/msoffcrypto/format/ppt97.py 2019-08-02
04:38:36.000000000 +0200
+++ new/msoffcrypto-tool-4.10.2/msoffcrypto/format/ppt97.py 2020-04-07
20:55:40.000000000 +0200
@@ -231,7 +231,11 @@
# encryptSessionPersistIdRef (4 bytes): An optional PersistIdRef
# that specifies the value to look up in the persist object directory
# to find the offset of the CryptSession10Container record (section 2.3.7).
- encryptSessionPersistIdRef, = unpack("<I", blob.read(4))
+ buf = blob.read(4)
+ if len(buf) == 4:
+ encryptSessionPersistIdRef, = unpack("<I", buf)
+ else:
+ encryptSessionPersistIdRef = None
return UserEditAtom(
rh=rh,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/msoffcrypto-tool-4.10.1/msoffcrypto/method/rc4_cryptoapi.py
new/msoffcrypto-tool-4.10.2/msoffcrypto/method/rc4_cryptoapi.py
--- old/msoffcrypto-tool-4.10.1/msoffcrypto/method/rc4_cryptoapi.py
2019-08-02 04:38:36.000000000 +0200
+++ new/msoffcrypto-tool-4.10.2/msoffcrypto/method/rc4_cryptoapi.py
2020-04-07 20:55:40.000000000 +0200
@@ -18,8 +18,8 @@
h0 = sha1(salt + password).digest()
blockbytes = pack("<I", block)
hfinal = sha1(h0 + blockbytes).digest()
- if keyLength == 40: # TODO
- raise Exception("Not implemented")
+ if keyLength == 40:
+ key = hfinal[:5] + b"\x00" * 11
else:
key = hfinal[:keyLength // 8]
return key
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/msoffcrypto-tool-4.10.1/msoffcrypto_tool.egg-info/PKG-INFO
new/msoffcrypto-tool-4.10.2/msoffcrypto_tool.egg-info/PKG-INFO
--- old/msoffcrypto-tool-4.10.1/msoffcrypto_tool.egg-info/PKG-INFO
2019-08-02 04:39:13.000000000 +0200
+++ new/msoffcrypto-tool-4.10.2/msoffcrypto_tool.egg-info/PKG-INFO
2020-04-07 20:56:12.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: msoffcrypto-tool
-Version: 4.10.1
+Version: 4.10.2
Summary: A Python tool and library for decrypting MS Office files with
passwords or other keys
Home-page: https://github.com/nolze/msoffcrypto-tool
Author: nolze
@@ -10,7 +10,7 @@
[](https://badge.fury.io/py/msoffcrypto-tool)
[](https://pypistats.org/packages/msoffcrypto-tool)
- [](https://travis-ci.org/nolze/msoffcrypto-tool)
+ [](https://travis-ci.com/nolze/msoffcrypto-tool)
[](https://codecov.io/gh/nolze/msoffcrypto-tool)
[](http://msoffcrypto-tool.readthedocs.io/en/latest/?badge=latest)
@@ -23,7 +23,7 @@
* [Supported encryption methods](#supported-encryption-methods)
* [Tests](#tests)
* [Todo](#todo)
- * [References](#references)
+ * [Resources](#resources)
* [Use cases and mentions](#use-cases-and-mentions)
* [Contributors](#contributors)
@@ -128,7 +128,7 @@
* [ ] Use a kind of `ctypes.Structure`
* [ ] Support encryption
- ## See also
+ ## Resources
* "Backdooring MS Office documents with secret master keys"
<http://secuinside.com/archive/2015/2015-1-9.pdf>
* Technical Documents
<https://msdn.microsoft.com/en-us/library/cc313105.aspx>
@@ -147,10 +147,12 @@
## Use cases and mentions
+ * <https://repology.org/project/python:msoffcrypto-tool/versions>
(kudos to maintainers!)
*
<https://github.com/jbremer/sflock/commit/3f6a96abe1dbb4405e4fb7fd0d16863f634b09fb>
* <https://github.com/dtjohnson/xlsx-populate>
*
<https://github.com/shombo/cyberstakes-writeps-2018/tree/master/word_up>
*
<https://isc.sans.edu/forums/diary/Video+Analyzing+Encrypted+Malicious+Office+Documents/24572/>
+ * <https://checkroth.com/unlocking-password-protected-files.html>
## Contributors
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/msoffcrypto-tool-4.10.1/tests/test_cli.sh
new/msoffcrypto-tool-4.10.2/tests/test_cli.sh
--- old/msoffcrypto-tool-4.10.1/tests/test_cli.sh 2019-08-02
04:38:36.000000000 +0200
+++ new/msoffcrypto-tool-4.10.2/tests/test_cli.sh 2020-04-07
20:55:40.000000000 +0200
@@ -3,15 +3,33 @@
set -ev
cd tests
+
+msoffcrypto-tool --test inputs/example_password.docx && : ; [ $? = 0 ]
+msoffcrypto-tool --test outputs/example.docx && : ; [ $? = 1 ]
msoffcrypto-tool -p Password1234_ inputs/example_password.docx
/tmp/example.docx
diff /tmp/example.docx outputs/example.docx
+
+msoffcrypto-tool --test inputs/example_password.xlsx && : ; [ $? = 0 ]
+msoffcrypto-tool --test outputs/example.xlsx && : ; [ $? = 1 ]
msoffcrypto-tool -p Password1234_ inputs/example_password.xlsx
/tmp/example.xlsx
diff /tmp/example.xlsx outputs/example.xlsx
+
+msoffcrypto-tool --test inputs/ecma376standard_password.docx && : ; [ $? = 0 ]
+msoffcrypto-tool --test outputs/ecma376standard_password_plain.docx && : ; [
$? = 1 ]
msoffcrypto-tool -p Password1234_ inputs/ecma376standard_password.docx
/tmp/ecma376standard_password_plain.docx
diff /tmp/ecma376standard_password_plain.docx
outputs/ecma376standard_password_plain.docx
+
+msoffcrypto-tool --test inputs/rc4cryptoapi_password.doc && : ; [ $? = 0 ]
+msoffcrypto-tool --test outputs/rc4cryptoapi_password_plain.doc && : ; [ $? =
1 ]
msoffcrypto-tool -p Password1234_ inputs/rc4cryptoapi_password.doc
/tmp/rc4cryptoapi_password_plain.doc
diff /tmp/rc4cryptoapi_password_plain.doc
outputs/rc4cryptoapi_password_plain.doc
+
+msoffcrypto-tool --test inputs/rc4cryptoapi_password.xls && : ; [ $? = 0 ]
+msoffcrypto-tool --test outputs/rc4cryptoapi_password_plain.xls && : ; [ $? =
1 ]
msoffcrypto-tool -p Password1234_ inputs/rc4cryptoapi_password.xls
/tmp/rc4cryptoapi_password_plain.xls
diff /tmp/rc4cryptoapi_password_plain.xls
outputs/rc4cryptoapi_password_plain.xls
+
+msoffcrypto-tool --test inputs/rc4cryptoapi_password.ppt && : ; [ $? = 0 ]
+msoffcrypto-tool --test outputs/rc4cryptoapi_password_plain.ppt && : ; [ $? =
1 ]
msoffcrypto-tool -p Password1234_ inputs/rc4cryptoapi_password.ppt
/tmp/rc4cryptoapi_password_plain.ppt
diff /tmp/rc4cryptoapi_password_plain.ppt
outputs/rc4cryptoapi_password_plain.ppt