-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Open
Labels
RFC / discussionHelp or comments wantedHelp or comments wanted
Milestone
Description
I got this from a user. I'm not sure if it's a bug or just a Python version thing? If it's the latter we may need a try/catch.
Whilst trying to use office2john to extract a password hash from an old ("2005") excel file, office2john kept crashing with the error:
=> python3 office2john.py organiser.xls
Traceback (most recent call last):
File "office2john.py", line 2603, in process_file
if accdb_magic in data and accdb_xml_start in data:
TypeError: a bytes-like object is required, not 'str'
organiser.xls : OLE check failed, a bytes-like object is required, not 'str'I corrected the error by amending these lines:
accdb_xml_start = "'<?xml version="1.0"' accdb_xml_trailer = '</encryption>')to
accdb_magic = bytes("Standard ACE DB",'utf-8') accdb_xml_start = bytes('<?xml version="1.0"', 'utf-8') accdb_xml_trailer = bytes( '</encryption>', 'utf-8')and the script now runs and produces the required output.
retheon, dennisonsouza, p3psi-boo and wutian082
Metadata
Metadata
Assignees
Labels
RFC / discussionHelp or comments wantedHelp or comments wanted