initstring / linkedin2username

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

Added cookie functionality #40

Closed aN0mad closed 1 year ago

aN0mad commented 2 years ago

Problem

I was having a weird problem with LinkedIn where every time I logged out and logged back in I would get a pop-up asking me to confirm my email and phone number. This obliviously created a problem for using this tool, as after successfully authenticating to LinkedIn, I would not be redirected to '/feed' but to the pop-up which causes the script to exit.

Solution

This pull request adds the ability use a Netscape formatted cookie file with the tool, instead of having the tool authenticate with a username/password combo. It also adds a scripts folder with a python script to convert a json python dictionary to the needed Netscape cookie file format.

initstring commented 2 years ago

Thanks so much for the PR!

I have a lot going on right now, and it might take some time until I get to it. I know the problem about LinkedIn asking for a phone number is annoying, so thanks for being proactive about fixing this.

The cookie approach is interesting, but just off the top of my head wouldn't it be easier to simply add support to the Python script to click past the phone number prompt and continue to the feed?

Thanks!!!

initstring commented 2 years ago

I'm going to take a shot at the method I mentioned above, to simply click past warnings when they pop up. You can do it in the web, I imagine it wouldn't be too hard to add that to the tool.

However, I can't currently reproduce the phone number prompt. I will keep trying with my test account until it comes back, so I can capture and work on this.

If I can't get that method to work, I'll take a deeper look at this PR.

Thanks!

initstring commented 1 year ago

I've been trying almost daily for a month now and I just can't reproduce any prompts, such as the "add a phone number" one. I need to do this in order to fix the auth flow to simply ignore those prompts.

I'm going to close this MR as I'd prefer to fix the auth, rather than add additional functionality and parsing scripts.

I'll try again to fix the auth if I can ever reproduce the problem or if anyone can provide enough details on the HTTP responses during this error condition.

I do very much appreciate the contribution, and my apologies for not merging to main - it's just not a piece I want to maintain myself.

Thanks again.

initstring commented 1 year ago

@theRealFr13nd -

I think I might have found a fix for the phone number check. If you encounter it again, you can try the code in this PR: https://github.com/initstring/linkedin2username/pull/45

aN0mad commented 1 year ago

Yup makes sense. Was just a fast way for me to throw code together and got me working on my engagement. Cheers!