Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@rchatterjee
Copy link

The script was crashing due to incorrect str-byte concatenation. See the snippet below.

$ python3 pdf2john.py ~/win/Downloads/8527273050231012021.pdf
Traceback (most recent call last):
  File "pdf2john.py", line 329, in <module>
    parser.parse()
  File "pdf2john.py", line 116, in parse
    gecos = self.parse_meta_data(trailer)
  File "pdf2john.py", line 173, in parse_meta_data
    xmp_metadata_object = self.get_pdf_object(object_id)
  File "pdf2john.py", line 223, in get_pdf_object
    print(">>", repr(object_id.decode()))
AttributeError: 'str' object has no attribute 'decode'

The script was crashing due to incorrect str-byte concatenation.  See the snippet below.
```bash
$ python3 pdf2john.py ~/win/Downloads/8527273050231012021.pdf
Traceback (most recent call last):
  File "pdf2john.py", line 329, in <module>
    parser.parse()
  File "pdf2john.py", line 116, in parse
    gecos = self.parse_meta_data(trailer)
  File "pdf2john.py", line 173, in parse_meta_data
    xmp_metadata_object = self.get_pdf_object(object_id)
  File "pdf2john.py", line 223, in get_pdf_object
    print(">>", repr(object_id.decode()))
AttributeError: 'str' object has no attribute 'decode'
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant