Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
arthurlutz opened this issue Apr 21, 2024 · 0 comments

Comments

@arthurlutz
Copy link

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)

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

No branches or pull requests

1 participant