mxrch / GHunt

🕵️‍♂️ Offensive Google framework.
Other
15.84k stars 1.32k forks source link

Cookies invalid #476

Closed E5GEN2 closed 10 months ago

E5GEN2 commented 11 months ago

Since today I get cookies invalid all the time no matter what I try.

Navitas28 commented 11 months ago

Same issue

AlexMurd commented 11 months ago

Same here

Shoukaku07 commented 11 months ago

same issue:


     .d8888b.  888    888                   888
    d88P  Y88b 888    888                   888
    888    888 888    888                   888
    888        8888888888 888  888 88888b.  888888
    888  88888 888    888 888  888 888 "88b 888
    888    888 888    888 888  888 888  888 888
    Y88b  d88P 888    888 Y88b 888 888  888 Y88b.
     "Y8888P88 888    888  "Y88888 888  888  "Y888 v2

             By: mxrch (🐦 @mxrchreborn)
       Support my work on GitHub Sponsors ! 💖

[-] No stored cookies found

You can facilitate configuring GHunt by using the GHunt Companion extension on Firefox, Chrome, Edge and Opera here :
=> https://github.com/mxrch/ghunt_companion

[1] (Companion) Put GHunt on listening mode (currently not compatible with docker)
[2] (Companion) Paste base64-encoded cookies
[3] Enter manually all cookies

Choice => 1
GHunt is listening on port 60067...
[+] Received cookies !

[-] Seems like the cookies are invalid, try regenerating them.
iKey-333 commented 11 months ago

please share the solution if found

divyani08 commented 11 months ago

Facing same issue, anyone has the solution?

Navitas28 commented 10 months ago

Whatever I try, keep getting the same issue:

  1. Tried uninstalling the browser, still keeps failing
  2. Tried with the new google account, no luck
  3. Tried with firefox, still failed.
  4. Tried with docker image, but failed

Please suggest

mxrch commented 10 months ago

I confirm the bug, Google changed something. I unfortunately don't know how to fix this quickly, it will require some time to understand what changes are needed.

securekr commented 10 months ago

oauth_tokens ???

iKey-333 commented 10 months ago

I confirm the bug, Google changed something. I unfortunately don't know how to fix this quickly, it will require some time to understand what changes are needed.

Hello. please tell me that there is already a solution :)

Shion1305 commented 10 months ago

Hey, I found a solution and submitted PR!

Both GHunt and Chrome extension ghunt_companion needs to be fixed. If you want to use before PR merges, do followings.

blackbla1 commented 10 months ago

Could you make it more simple to understand for beginners? Thank you.

vuter7 commented 10 months ago

@shion1305

Traceback (most recent call last):
  File "/usr/local/bin/ghunt", line 33, in <module>
    sys.exit(load_entry_point('ghunt', 'console_scripts', 'ghunt')())
  File "/root/GHunt/ghunt/ghunt.py", line 15, in main
    parse_and_run()
  File "/root/GHunt/ghunt/cli.py", line 31, in parse_and_run
    process_args(args)
  File "/root/GHunt/ghunt/cli.py", line 38, in process_args
    trio.run(login.check_and_login, None, args.clean)
  File "/usr/local/lib/python3.10/dist-packages/trio/_core/_run.py", line 1946, in run
    raise runner.main_task_outcome.error
  File "/root/GHunt/ghunt/modules/login.py", line 38, in check_and_login
    cookies, oauth_token = await getting_cookies_dialog(wanted_cookies)
  File "/root/GHunt/ghunt/helpers/auth.py", line 143, in getting_cookies_dialog
    data = json.loads(base64.b64decode(received_data))
  File "/usr/lib/python3.10/base64.py", line 87, in b64decode
    return binascii.a2b_base64(s)
binascii.Error: Incorrect padding

help please

Shion1305 commented 10 months ago

@vuter7 Looks like the bug is unrelated to my changes, I think I can't help you. Providing more details would be appreciated.

Shion1305 commented 10 months ago

@blackbla1 Then you have to wait until the problem is fixed, unfortunately.

mxrch commented 10 months ago

Little note about it : https://github.com/mxrch/GHunt/issues/481

Alice-Deane commented 10 months ago

Hi all,

I'm encountering the same issue as vuter7. The error is as follows:

Traceback (most recent call last):
  File "/GHunt-master/main.py", line 2, in <module>
    from ghunt import ghunt; ghunt.main()
                             ^^^^^^^^^^^^
  File "/GHunt-master/ghunt/ghunt.py", line 15, in main
    parse_and_run()
  File "/GHunt-master/ghunt/cli.py", line 31, in parse_and_run
    process_args(args)
  File "/GHunt-master/ghunt/cli.py", line 38, in process_args
    trio.run(login.check_and_login, None, args.clean)
  File "/GHunt-master/venv/lib/python3.11/site-packages/trio/_core/_run.py", line 1946, in run
    raise runner.main_task_outcome.error
  File "/GHunt-master/ghunt/modules/login.py", line 38, in check_and_login
    cookies, oauth_token = await getting_cookies_dialog(wanted_cookies)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/GHunt-master/ghunt/helpers/auth.py", line 147, in getting_cookies_dialog
    data = json.loads(base64.b64decode(received_data))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/base64.py", line 88, in b64decode
    return binascii.a2b_base64(s, strict_mode=validate)

I suspect that the issue lies in the incomplete transmission of the base64-encoded cookie to the GHunt master. As shion mentioned, I have modified both the Ghunt-companion extension and the GHunt master. When I attempt to print "received_data" in auth.py, the result differs from when I simply copy/paste the cookies from Ghunt-companion, indicating that a portion is missing. Any assistance would be appreciated.

Shion1305 commented 10 months ago

Hi, I posted a screencapture, hope this helps. https://github.com/mxrch/GHunt/pull/480#issuecomment-1890160309

E5GEN2 commented 10 months ago

@mxrch Boss, I saw you made new commits. Have you guys fixed the cookie issue?

mxrch commented 10 months ago

@mxrch Boss, I saw you made new commits. Have you guys fixed the cookie issue?

Yup ! pipx upgrade ghunt