Skip to content
This repository has been archived by the owner on Apr 30, 2023. It is now read-only.

TooManyRedirects: Exceeded 30 redirects #20

Open
ServerMonkey opened this issue Apr 1, 2021 · 17 comments
Open

TooManyRedirects: Exceeded 30 redirects #20

ServerMonkey opened this issue Apr 1, 2021 · 17 comments

Comments

@ServerMonkey
Copy link

[*] Enter search Keywords (use quotes for more precise results)
anyrandomorg

[*] Enter filename for output (exclude file extension)
anyrandomorg

[*] Filter by Company? (Y/N): 
y

[*] Specify a Company ID (Provide ID or leave blank to automate): 


[*] Enter e-mail domain suffix (eg. contoso.com): 
anyrandomorg.org

[*] Select a prefix for e-mail generation (auto,full,firstlast,firstmlast,flast,firstl,first.last,fmlast,lastfirst,first): 
auto

[*] Automatically using Hunter IO to determine best Prefix
[!] {f}{last}
[+] Found flast prefix

[*] Obtained new session
Traceback (most recent call last):
  File "LinkedInt.py", line 431, in <module>
    get_search()
  File "LinkedInt.py", line 146, in get_search
    r = requests.get(url, cookies=cookies, headers=headers)
  File "LinkedInt/venv/lib/python3.7/site-packages/requests/api.py", line 75, in get
    return request('get', url, params=params, **kwargs)
  File "LinkedInt/venv/lib/python3.7/site-packages/requests/api.py", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "LinkedInt/venv/lib/python3.7/site-packages/requests/sessions.py", line 524, in request
    resp = self.send(prep, **send_kwargs)
  File "LinkedInt/venv/lib/python3.7/site-packages/requests/sessions.py", line 659, in send
    history = [resp for resp in gen] if allow_redirects else []
  File "LinkedInt/venv/lib/python3.7/site-packages/requests/sessions.py", line 659, in <listcomp>
    history = [resp for resp in gen] if allow_redirects else []
  File "LinkedInt/venv/lib/python3.7/site-packages/requests/sessions.py", line 156, in resolve_redirects
    raise TooManyRedirects('Exceeded %s redirects.' % self.max_redirects, response=resp)
requests.exceptions.TooManyRedirects: Exceeded 30 redirects.
@vysecurity
Copy link
Owner

Try put some quotes around your name as it asks. I saw a few people had this problem, maybe related to other issues with your LinkedIn account.

@ServerMonkey
Copy link
Author

Tried quotes, no change.

Can you define "other issues"?

What else can I try?

@vysecurity
Copy link
Owner

vysecurity commented Apr 6, 2021 via email

@ServerMonkey
Copy link
Author

I see now that LinkedIn sends me emails with PIN codes, each time I try to use LinkedInt.
(I should have checked my mails earlier :P )

Someone tried to log in to LinkedIn in your name from a place you did not use before, so we just want to make sure it really is you.
If you tried to log in:
Please use this verification code to log in: A_PIN_HERE

But I am on the same IP.
I guess with "a place you did not use before", they mean User-Agent or some kind of Browser Identification via LinkedInt.
I have no problem accessing LinkedIn via Chromium or Firefox from the same host. Never needed a PIN there.

@vysecurity
Copy link
Owner

Perhaps, but I sorted the PIN problem out once and the tool worked fine from then on.

@ServerMonkey
Copy link
Author

I understand.
Tested some more but I can't get around the PIN problem.
Maybe LinkedIn does PIN verification only occasionally or only once?

The LinkedIn PIN mail I got gives some additional information:

When and where this happened
Date:
April 7, 2021, 7:10 AM
Operating System:
Unknown
Browser:
Unknown

@sandwich-destroyer
Copy link

I am getting the same error now too. Too many redirects.

@sandwich-destroyer
Copy link

I think it might just be IP related, I switched to my standard VPN and it seems fine, however now there is a new error. Will create new issue

@fgeek
Copy link

fgeek commented Apr 19, 2021

I have this same issue with latest commit (fef9ba2) when using Python 3.7.3. I can login normally from same machine using browser so I believe it is not the PIN or MFA case. I also verified same issue happens with 1.1-FIX.

@vysecurity
Copy link
Owner

vysecurity commented Apr 19, 2021 via email

@wifiuk
Copy link

wifiuk commented May 13, 2021

I'm pretty sure this is 2FA related. i get alerts saying this is the 2FA code for your login, but no where to add that for the tool.

@MikJagger
Copy link

MikJagger commented Jul 2, 2021

I also received PIN message. In my case logging in on a browser from the same WAN IP solved this as expected.

@avk5718
Copy link

avk5718 commented Oct 6, 2021

There seems to be an unexpected redirect as a response to the POST request used to login. The response redirects to a page where u have to solve a captcha. If u don't solve the captcha, the cookies that are set on ur end are different than the ones expected to make the required calls and you will keep going through redirects. The cheap workaround that I did to go past this was to go through the login using burp, copy the cookie values (li_at and li_rm), and changed the login function to accept the cookie values (user input), and then run it

@wifiuk
Copy link

wifiuk commented Feb 14, 2022

There seems to be an unexpected redirect as a response to the POST request used to login. The response redirects to a page where u have to solve a captcha. If u don't solve the captcha, the cookies that are set on ur end are different than the ones expected to make the required calls and you will keep going through redirects. The cheap workaround that I did to go past this was to go through the login using burp, copy the cookie values (li_at and li_rm), and changed the login function to accept the cookie values (user input), and then run it

good if you can add a guide for that

@johnneerdael
Copy link

Same issues and trying with a VPN does not help. However I get no mails asking for a PIN

@ryanpoh
Copy link

ryanpoh commented Aug 23, 2022

+1

@stnorbi
Copy link

stnorbi commented Apr 6, 2023

+1

Is there any chance to fix this? *-) As I see issue has been opened since 2021-04-01.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants