Some organization email queries is causing KeyError: 'people'
Hi, I found out there is 'feature' like this. Is some knowhow needed or just good old bug?
Input:
ghunt email <some organization | association>@gmail.com
Result:
Traceback (most recent call last):
File "/root/.local/bin/ghunt", line 8, in <module>
sys.exit(main())
File "/root/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/ghunt/ghunt.py", line 15, in main
parse_and_run()
File "/root/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/ghunt/cli.py", line 31, in parse_and_run
process_args(args)
File "/root/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/ghunt/cli.py", line 41, in process_args
trio.run(email.hunt, None, args.email_address, args.json)
File "/root/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/trio/_core/_run.py", line 1946, in run
raise runner.main_task_outcome.error
File "/root/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/ghunt/modules/email.py", line 31, in hunt
is_found, target = await people_pa.people_lookup(as_client, email_address, params_template="max_details")
File "/root/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/ghunt/apis/peoplepa.py", line 103, in people_lookup
person_data = list(data["people"].values())[0]
KeyError: 'people'
OS:
- Docker container - base image
python:3.10
I cannot give a email for testing.. OPSEC 😉
its a bug in the script, examine the code of the ghunt script to identify and fix the issue.
It might be possible that there was some authentication problems in background.
@pranali18-Ai wtf is that useless ChatGPT reply
Did you guys find a fix for it? I am facing the same problem.
Did you guys find a fix for it? I am facing the same problem.
I haven't had time for this.
But maybe someone can add some try..except logic around this person_data = list(data["people"].values())[0].
Its very error prone to make this kind of assumptions in code that is consuming external api.
{'error': {'code': 400, 'message': 'Request contains an invalid argument.', 'status': 'INVALID_ARGUMENT'}}
and the argument you must crop from the request is :
https://github.com/mxrch/GHunt/blob/7042aa0f4664b273e6f8748710c0b8d06890934c/ghunt/apis/peoplepa.py#L60 "GPLUS_ADDITIONAL_DATA"
Google invalided the GPLUS_ADDITIONAL_DATA param, please pipx upgrade ghunt :)
Google invalided the
GPLUS_ADDITIONAL_DATAparam, pleasepipx upgrade ghunt:)
please tell me what this parameter was responsible for? What information are we now deprived of?
KeyError: 'people'
This error was fixed in latest release. It was about changes at Google side.