Skip to content

json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) #7

Description

@arthurlutz

Trying to decode a protobuf message using the page.proto from googleapis : https://github.com/googleapis/googleapis/

python main.py -t protobuf --base64 -nk --definitions ~/local/googleapis/google/cloud/dialogflow/cx/v3/page.proto  ~/tmp/404ctf/protobuf.data  
Traceback (most recent call last):
  File "/home/arthur/local/ProtoDeep/main.py", line 3, in <module>
    main()
  File "/home/arthur/local/ProtoDeep/protodeep/protodeep.py", line 13, in main
    parse_and_run()
  File "/home/arthur/local/ProtoDeep/protodeep/cli.py", line 39, in parse_and_run
    process_args(args)
  File "/home/arthur/local/ProtoDeep/protodeep/cli.py", line 43, in process_args
    analyze(
  File "/home/arthur/local/ProtoDeep/protodeep/modules/analyze.py", line 63, in main
    definitions = json.loads(raw_defs)
                  ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

the protobuf.data content is :

CJO2yQEIpLbJAQipncoBCOHZygEIlaHLAQiFoM0BCOLszQEIkofOAQiG1cwiGPTJzQEY1d3NARiY9c0BGNiGzgE=

(part of a CTF, not real data)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions