[GH-ISSUE #2323] office2john.py says 'Need to fix a bug with 32 bit arrays, please contact author...' #1554

Closed
opened 2026-10-15 04:20:02 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @MCherrey on GitHub (Nov 10, 2016).
Original GitHub issue: https://github.com/openwall/john/issues/2323

I am trying to recover an excel document password by extracting the hashes with office2john.py. It worked on one of the files I had, but the other gave me an error and told me to contact the author because of a bug with 32bit.

[matthewc@matthew-pc Documents]$ ./office2john.py "test.xls"
  File "./office2john.py", line 213
    raise ValueError, 'Need to fix a bug with 32 bit arrays, please contact author...'
                    ^
SyntaxError: invalid syntax

​Code it refers to:

213 if PY3:
214     from io import BytesIO as StringIO
215 else:
216     from StringIO import StringIO
217
​​218 #[PL] Define explicitly the public API to avoid private objects in pydoc:
219 __all__ = ['OleFileIO', 'isOleFile']
220 
221 #[PL] workaround to fix an issue with array item size on 64 bits systems:
222 if array.array('L').itemsize == 4:
223     # on 32 bits platforms, long integers in an array are 32 bits:
224     UINT32 = 'L'
225 elif array.array('I').itemsize == 4:
226     # on 64 bits platforms, integers in an array are 32 bits:
227     UINT32 = 'I'
228 else:
Originally created by @MCherrey on GitHub (Nov 10, 2016). Original GitHub issue: https://github.com/openwall/john/issues/2323 I am trying to recover an excel document password by extracting the hashes with office2john.py. It worked on one of the files I had, but the other gave me an error and told me to contact the author because of a bug with 32bit. ``` [matthewc@matthew-pc Documents]$ ./office2john.py "test.xls" File "./office2john.py", line 213 raise ValueError, 'Need to fix a bug with 32 bit arrays, please contact author...' ^ SyntaxError: invalid syntax ``` ​Code it refers to: ``` 213 if PY3: 214 from io import BytesIO as StringIO 215 else: 216 from StringIO import StringIO 217 ​​218 #[PL] Define explicitly the public API to avoid private objects in pydoc: 219 __all__ = ['OleFileIO', 'isOleFile'] 220 221 #[PL] workaround to fix an issue with array item size on 64 bits systems: 222 if array.array('L').itemsize == 4: 223 # on 32 bits platforms, long integers in an array are 32 bits: 224 UINT32 = 'L' 225 elif array.array('I').itemsize == 4: 226 # on 64 bits platforms, integers in an array are 32 bits: 227 UINT32 = 'I' 228 else: ```
bsakaguchi 2026-10-15 04:20:02 +07:00
Author
Owner

@kholia commented on GitHub (Nov 10, 2016):

@Nightshaxx Like I said in the private email, report this bug to the upstream project. This code is part of the OleFileIO_PL library.

<!-- gh-comment-id:259630465 --> @kholia commented on GitHub (Nov 10, 2016): @Nightshaxx Like I said in the private email, report this bug to the [upstream project](https://bitbucket.org/decalage/olefileio_pl/issues). This code is part of the OleFileIO_PL library.
Author
Owner

@kholia commented on GitHub (Jan 24, 2017):

I cannot reproduce this problem.

@Nightshaxx If you want to get this problem fixed, report this issue to the upstream project along with a reproducer.

I am closing this bug as I am not planning to do anything with it.

<!-- gh-comment-id:274725497 --> @kholia commented on GitHub (Jan 24, 2017): I cannot reproduce this problem. @Nightshaxx If you want to get this problem fixed, report this issue to the [upstream project](https://github.com/decalage2/olefile/issues) along with a reproducer. I am closing this bug as I am not planning to do anything with it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
openwall/john#1554
No description provided.