mxrch / GHunt

🕵️‍♂️ Offensive Google framework.
Other
15.79k stars 1.31k forks source link

GHunt crashes while gathering Google Maps data #529

Closed azurenekowo closed 1 month ago

azurenekowo commented 1 month ago

Describe the bug GHunt crashes while gathering and analyzing Google Maps data. This doesn't happen if the account doesn't have any reviews.

To Reproduce Steps to reproduce the behavior:

  1. Install GHunt
  2. Login with a Google account
  3. Perform a lookup on a Google account that has Google Maps data
  4. See error
    Traceback (most recent call last):
    File "<frozen runpy>", line 198, in _run_module_as_main
    File "<frozen runpy>", line 88, in _run_code
    File "c:\users\username\.local\bin\ghunt.exe\__main__.py", line 7, in <module>
    File "C:\Users\username\pipx\venvs\ghunt\Lib\site-packages\ghunt\ghunt.py", line 18, in main
    parse_and_run()
    File "C:\Users\username\pipx\venvs\ghunt\Lib\site-packages\ghunt\cli.py", line 55, in parse_and_run
    process_args(args)
    File "C:\Users\username\pipx\venvs\ghunt\Lib\site-packages\ghunt\cli.py", line 65, in process_args
    asyncio.run(email.hunt(None, args.email_address, args.json))
    File "C:\Users\username\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
    File "C:\Users\username\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\username\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 654, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
    File "C:\Users\username\pipx\venvs\ghunt\Lib\site-packages\ghunt\modules\email.py", line 118, in hunt
    gmaps.output(err, stats, reviews, photos, target.personId)
    File "C:\Users\username\pipx\venvs\ghunt\Lib\site-packages\ghunt\helpers\gmaps.py", line 333, in output
    costs_stats[review.location.cost_level] += 1
    ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    KeyError: 10

Expected behavior It worked a few days prior, but not now.

Screenshots N/A

System (please complete the following information):

Additional context N/A

fpasomeillan commented 1 month ago

I'm also experiencing this issue.

ChillVibesMushroom commented 1 month ago

There may be a change in http or https responses from the google api right that means that all the developer has to do is fix the code no dude we just have to wait for an update but we still get gaia ids and what nots which is useful

Ghunt is an amazing tool it'll probably be active for a while bro

Possible Reasons for the Error

Empty Response: The API might not be returning any data, possibly due to an invalid request or a rate limit being hit.
Invalid URL or Endpoint: The URL you are trying to access might be incorrect.
Network Issues: There may be connectivity issues preventing a proper response from the API.
API Changes: The API might have changed its response format or might be down temporarily.
mxrch commented 1 month ago

Hey @ChillVibesMushroom , I appreciate your intention in helping but your AI answers absolutely don't help as they provide no useful information, please avoid them.

mxrch commented 1 month ago

I'm looking at this issue now.

mxrch commented 1 month ago

Yeah okay they changed from €€ to €20–30

mxrch commented 1 month ago

It also looks currency dependent etc. Like, it can be €10–20, but also Kč 400–500.

I'll remove the costs calculation, very complex for now.

mxrch commented 1 month ago

Google Maps is now rate limiting by IP. I added a handle in if happens, telling the user to try again later.

mxrch commented 1 month ago

Fixed