GHunt icon indicating copy to clipboard operation
GHunt copied to clipboard

Invalid cookies at login

Open XFORWORKS opened this issue 2 years ago • 16 comments

Describe the bug A new bug from httpx disables the feature of using the script and adding new cookies.

To Reproduce Just type the command "ghunt login" and try to add new cookies.

Expected behavior It says it received the cookies but no matter the account I use, they are always invalid (I know it's a problem with the script because the same account I used, worked in the past for me). The expected behavior is for it to work.

Screenshots ghunt1

System (please complete the following information):

  • OS : Kali Linux WSL2
  • Python Version : 3.11.4

Additional context Before I reinstalled GHunt, I had the message : <UserWarning: Unclosed <httpx.AsyncClient object at 0x7f7425f99390> If I could I would gladly send a picture again, but the message stopped showing after I reinstalled GHunt with pip3.

XFORWORKS avatar Aug 08 '23 19:08 XFORWORKS

I have the same issue

esidate avatar Aug 15 '23 14:08 esidate

idem for me... :-(

frHaKtal avatar Aug 23 '23 23:08 frHaKtal

Only time I had this error recently was when I was "connected" at multiple accounts on the same browser (you know, when you switch between accounts etc, Google makes you easily to switch between them), so I cleared cookies, re-tried and it worked. Can someone who have this error try this ?

mxrch avatar Aug 24 '23 06:08 mxrch

This is not an error of which I know how to reproduce 100% of the time, so it makes it difficult to fix.

mxrch avatar Aug 24 '23 06:08 mxrch

@mxrch You're right. I removed the other gmail accounts leaving only one and it worked. I might do a pull request soon to fix this. Thank you.

esidate avatar Aug 24 '23 08:08 esidate

And hopefully, that's soon.

XFORWORKS avatar Aug 24 '23 14:08 XFORWORKS

Confirmed also for me, that having a browser with multiple accounts caused this issue. Switching to a browser with only one account attached to it resolved the issue for me.

micduffy avatar Aug 24 '23 20:08 micduffy

I start to get the issue too, so I can investigate For a temporary workaround, go on https://accounts.google.com/robots.txt, clear your cookies and retry to login with the extension

mxrch avatar Sep 05 '23 07:09 mxrch

I start to get the issue too, so I can investigate For a temporary workaround, go on https://accounts.google.com/robots.txt, clear your cookies and retry to login with the extension

Just get firefox or other browser, install the extension, login with google then use it. Simple as that and u don't have to login again on ur main browser !

CreedoW avatar Sep 05 '23 15:09 CreedoW

I start to get the issue too, so I can investigate For a temporary workaround, go on https://accounts.google.com/robots.txt, clear your cookies and retry to login with the extension

Just get firefox or other browser, install the extension, login with google then use it. Simple as that and u don't have to login again on ur main browser !

Ok thanks I will try it (joking I'm the developer)

mxrch avatar Sep 05 '23 15:09 mxrch

I was have same issue, use Firefox instead of Chrome helps me

v9lu avatar Sep 06 '23 01:09 v9lu

Likewise, it did in fact help.

XFORWORKS avatar Sep 07 '23 17:09 XFORWORKS

same, latest firefox

ubranch avatar Sep 22 '23 08:09 ubranch

Only time I had this error recently was when I was "connected" at multiple accounts on the same browser (you know, when you switch between accounts etc, Google makes you easily to switch between them), so I cleared cookies, re-tried and it worked. Can someone who have this error try this ?

bingo! worked here.

diehard88 avatar Oct 06 '23 09:10 diehard88

I have a slightly different issue, and it's not related to where I obtain cookies. I'm using the Mozilla browser, and the cookies have been cleared. They are valid on the second server but not on the first one. I've tried various options, but the result is zero. Below, I'm providing information from the terminal. As you can see, it says, "The cookies seem valid" and "Got OAuth2 token." I've established a connection with the account, and I've received the name and email address. However, then some magic happens, and I end up with a KeyError: 'SIDCC.' What could be the cause? Linux 6.1.42 Python 3.10.0

PS: The email address, account name, servers, and token mentioned below have been altered)

[+] The cookies seems valid !

[+] Got OAuth2 token => oauth2_4/0AfJohXn76B6brtOCpK6udfP7FL-Lxim0OL7oQTxX_KrtoI3UNrWNMc9aqDEP5Vyb_PHYtg

[Connected account] Name : Sergo Danse Email : [email protected]

🔑 A master token has been generated for your account and saved in the credentials file, please keep it safe as if it were your password, because it gives access to a lot of Google services, and with that, your personal information. Master token services access : mail, youtube, hist, cl Generating OSIDs ... Traceback (most recent call last): File "/home/bond007/.local/bin/ghunt", line 8, in sys.exit(main()) File "/home/bond007/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/ghunt/ghunt.py", line 15, in main parse_and_run() File "/home/bond007/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/ghunt/cli.py", line 31, in parse_and_run process_args(args) File "/home/bond007/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/ghunt/cli.py", line 38, in process_args trio.run(login.check_and_login, None, args.clean) File "/home/bond007/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/trio/_core/_run.py", line 1946, in run raise runner.main_task_outcome.error File "/home/bond007/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/ghunt/modules/login.py", line 90, in check_and_login ghunt_creds.osids = await gen_osids(cookies, osids) File "/home/bond007/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/ghunt/helpers/auth.py", line 77, in gen_osids sample_cookies[cookie] = req.cookies[cookie] File "/home/bond007/.local/pipx/venvs/ghunt/lib/python3.10/site-packages/httpx/_models.py", line 1144, in getitem raise KeyError(name) KeyError: 'SIDCC'

pip-ru avatar Nov 02 '23 10:11 pip-ru

Can confirm that this worked for me as well. Initially tried both ways, got invalid cookie error, clearing cookies generated a valid cookie!

nonlaminar avatar Nov 09 '23 22:11 nonlaminar

I'm having the invalid cookies issue. I was successful doing this on another device a month ago, however, I'm getting trouble now. I have tried on both Firefox and Chrome with clearing all cookies on browser, but keep getting invalid cookies.

I have been messing around with Google authentication page on the beginning of the year, noticed some changes. I think this issue can be related to the update.

Shion1305 avatar Jan 08 '24 16:01 Shion1305

Confirmed the report on the same situation on #476 . I suggest this issue be closed.

Shion1305 avatar Jan 10 '24 18:01 Shion1305