Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yikes, got an HTTP 400. This is not normal #72

Closed
gusmaocool opened this issue Oct 5, 2023 · 9 comments · Fixed by #74
Closed

Yikes, got an HTTP 400. This is not normal #72

gusmaocool opened this issue Oct 5, 2023 · 9 comments · Fixed by #74
Assignees
Labels
help wanted Extra attention is needed

Comments

@gusmaocool
Copy link

Hi everyone!

After starting the tool, it brought me this message. "Yikes, got an HTTP 400. This is not normal" What does that mean?

@initstring
Copy link
Owner

Hi @gusmaocool, thanks for opening an issue!

Can you please provide more details? Please share the commands you ran, what you did when the browser window popped open, the full text output from the console, and anything else think might be helpful.

You can obfuscate anything sensitive, like company names etc.

@gusmaocool
Copy link
Author

I am using Macbook M2 pro with ARM architecture. After I execute the command, the browser opens to the Linkedin login screen and I enter the credentials. I am logged in and leave the browser open. Then I press "Enter" and then it brings me this answer.
Screenshot 2023-10-05 at 18 14 14

@initstring
Copy link
Owner

Thanks for this!

It looks like it is logging in ok and grabbing your session cookies, as it has no problem getting the company info. The problem then is some sort of bad request when looping through the employees.

I tested the program myself right now, and I don't get the error. It completes ok. So at least LinkedIn hasn't totally blocked the tool. I'm also on an ARM-based Mac.

I'm not sure why you are getting this. You can troubleshoot a bit more using the "--proxy" flag to proxy your loops through Burp or Zap or something. If you spot something with the requests that looks off, and have an idea for a fix, can you let me know?

I'll leave this issue open, to see if others start experiencing the same problem too.

@rbtoms
Copy link

rbtoms commented Oct 6, 2023

It looks like I'm running into the same issue. Using "Google" as an example, it seems to result in an HTTP 400 response on the second API request. If it helps, I'm running an Intel-based MacOS architecture.

2023-10-05_16-00-33

2023-10-05_15-58-57

@initstring
Copy link
Owner

Thanks @rbtoms! This helps and I can now reproduce the issue. Looking into it...

@initstring
Copy link
Owner

I see when proxying normal traffic to LinkedIn that they are now using a graphql API endpoint that isn't so easy to understand. The queries don't take recognisable values. I noticed this a couple months ago, but the endpoints this tool was using were still available.

It's possible LinkedIn has deprecated the endpoints.

I don't think I will have time to troubleshoot this for a while. Probably the fix is one of:

  • Figure out this new graphql endpoint, and modify the tool to use it
  • Figure out some new random syntax or header or something required to continue using the old endpoint

@initstring initstring added the help wanted Extra attention is needed label Oct 6, 2023
@initstring
Copy link
Owner

initstring commented Oct 6, 2023

I just found this project that was previously using the same API as this tool. Their tool also broke, and it was indeed due to a transition to the graphql API.

Probably by looking at their diffs, it would be possible to see what needs fixing in linkedin2username: https://github.com/tomquirk/linkedin-api/pull/332/files

If anyone sees this issue, and has time to work on this, I would gladly review the pull request. It's just the "search" API that needs to be updated in linkedin2username, which is used in the get_results function.

Thanks!

@coj337
Copy link
Contributor

coj337 commented Oct 10, 2023

I needed this today so I'm just tidying up my patch, PR incoming soon!

@initstring initstring linked a pull request Oct 11, 2023 that will close this issue
@initstring
Copy link
Owner

Thanks @coj337 for your great contribution. I've merged it into a separate branch so I can get it working with the unit tests. Further work will happen in linked PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants