initstring / linkedin2username

OSINT Tool: Generate username lists for companies on LinkedIn
MIT License
1.25k stars 185 forks source link

unable to login in LinkedIn #60

Closed lupulabs closed 1 year ago

lupulabs commented 1 year ago

When I enter my credentials see the following result:

[-] LinkedIn has a message for you that you need to address. [*] Please log in using a web browser first, and then come back and try again. [-] Session could not be established.

I then open LinkedIn in my browser and see no message. I log out and back in and get the same result. I log in on other browsers on my machine, and get the same result.

I do have 2FA enabled, but I have it set to an authenticator app which generates a code.

I am running on an Intel MacBook Pro, Mac OS 13.4.1 (c) (22F770820d), Python 3.10.12 from homebrew, and I had to modify the requirements.txt to "psycopg2-binary==2.9.6" in order to be able to install. I plan on testing this on my M2 machine tomorrow to see if there is any difference.

Please let me know if there are any additional details needed.

2FA will be supported in the future?

mitras-git commented 1 year ago

Same issue here, when I try logging in it gave me an error stating LinkedIn has a message for me, I tried logging in from 2 different browsers and my phone but it took me straight to my feed, there was no message. I have my 2FA turned off since Day 1

While trying to debug the issue, I added a "print(redirect)" statement on line 338, which outputted "/checkpoint/challenge/AgFA7t9-gQlDNgAAAYoEGGQNAkeL0bscdMzJb8BwnYeDb931j0mBC4sisr9QNvJxd554PFESt2sqCsO1kA7hs8s-8Xclog?ut=2rZww5imnrnGU1"

So I'm gonna take a wild guess and say the bot trying to login was thrown with a security challenge.

Testing on 2020 M1 MacBook Pro

initstring commented 1 year ago

Hi @lupulabs - I have no plans to implement 2FA in this script, but am definitely open to a pull request if someone wants to add it in.

initstring commented 1 year ago

@mitras-git - I can reproduce this issue, I am also getting errors trying to run the tool now.

Thanks for providing some debug info.

I'm amazed the tool has worked for so long without LinkedIn making a change that breaks it. It looks like that must have finally happened.

I may not have time to troubleshoot this for a bit, so I will keep this issue open until then. Or, if someone else finds a fix I would gladly review a PR.

Thanks!

initstring commented 1 year ago

I did a bit of troubleshooting last night. The tool can still login without issue, but one of the voyager APIs now returns a 403. Either LinkedIn has restricted access to the undocumented API I was using, or made some other change required to use that API.

I use this API in two places - getting company info, and getting employee names.

I'm not sure if this is happening to everyone or just to my test accounts, but I suspect it is everyone as a Google search shows me this very similar issue in another project (https://github.com/nsandman/linkedin-api/issues/5)

initstring commented 1 year ago

Fixed 403 error: initstring-patch-2

initstring commented 1 year ago

@lupulabs - I'm closing this issue as there is no support for 2FA, and the tool will not work while you have that set up. @mitras-git - It's hard to determine when LinkedIn will challenge your login. I've had it happen, and then just go away after trying again or from another IP.

This issue did help me sort out a new header requirement, and I can confirm the tool works once again.

Closing this issue. If anyone has ideas to solve the sporadic challenges, please open a new issue or a PR.

Thanks!