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

Optimizing Cloudflare undetection #144

Merged

Conversation

YpNo
Copy link
Contributor

@YpNo YpNo commented Jan 9, 2024

Hi,

I've made some optimization about Cloudflare bot detection. I've tried to be as human as possible during the auth authentication and I have managed requests with Cookies.
I saw during the reverse engineering, the challenge process about getFactors and getFactorId has been changed. So, I tried to get it.
Moreover, the "prime256v1" curve doesn't work anymore (on my side). So I define the the "secp384r1" as primary Curve.

I think this MR solve #120 and #121 (maybe more).

Let me know, and I wish this MR will be merged ;)

Regards.

@YpNo
Copy link
Contributor Author

YpNo commented Jan 11, 2024

Ping @twrecked
I think you're very busy but could you delegate or add some trusted contributors to help you managing your projects ? The Community need you :)

@twrecked
Copy link
Owner

twrecked commented Mar 2, 2024

Thanks for this. It looks pretty good. I'll just check it here and see exactly what it does.

I'm always wary of changing the Cloudflare stuff because what fixes my stuff doesn't necessarily fix other people's. For example, I have 2 setups here that need different configuration to get passed the cloudflare login.

@YpNo
Copy link
Contributor Author

YpNo commented Apr 13, 2024

Hi @twrecked,
Any news about your works on Cloudflare ?
On my side, I cannot login without this PR. I am using https://github.com/kaffetorsk/arlo-streamer/ service associated with Frigate.

@twrecked
Copy link
Owner

Thanks for this. I'm just checking now.

I can't get the getFactorId call to return anything other than {'meta': {'code': 400, 'error': 9204, 'message': 'Browser is not trusted'}}; is it meant to act as a noop?

@YpNo
Copy link
Contributor Author

YpNo commented Apr 14, 2024

Thanks for this. I'm just checking now.

I can't get the getFactorId call to return anything other than {'meta': {'code': 400, 'error': 9204, 'message': 'Browser is not trusted'}}; is it meant to act as a noop?

Yes, just for the noop. I am not sure that, precisely at this point, the OPTION call is needed or not but i've wanted to reproduce same calls my browser did. The 400 error code appears beacause of wrong user-agent has been sent (for him). Either we let as is for now, or we can try to get a 200 HTTP code returned.

@twrecked twrecked merged commit cc23d0c into twrecked:master Apr 16, 2024
@twrecked
Copy link
Owner

I merged it. We'll see how it goes... and I feel it's always good to line everything up as close as possible so maybe the extra NOOPs will help.

@YpNo
Copy link
Contributor Author

YpNo commented Apr 16, 2024

Great, Thanks 👏
I will check if I can come over this noop as soon as possible.

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

Successfully merging this pull request may close these issues.

2 participants