Git Product home page Git Product logo

Comments (3)

Zalvie avatar Zalvie commented on August 23, 2024

CloudFlare has started to append a refresh header at the protection page with the actual answer and everything, you could just use that.

from cloudflare-scrape.

Anorov avatar Anorov commented on August 23, 2024

@Zalvie Nope, the Refresh header only includes the pass value, which is their newly added time token (Unix time + MAC hash to prevent tampering) to ensure a client has waited a certain number of seconds before getting past the challenge. jschl_answer is the parameter for the actual answer. I'm guessing the Refresh header was possibly added to improve performance for clients who've already passed the challenge once, though I'm not entirely sure of the intended flow... it would be very silly of them to include the actual answer there, since that defeats the point.

from cloudflare-scrape.

Anorov avatar Anorov commented on August 23, 2024

@Sh0cknsl I created 2 convenience functions to help with extracting just the cookies: get_tokens() and get_cookie_string(). See https://github.com/Anorov/cloudflare-scrape#integration

For weevely in particular, you're going to want to modify additional_headers in core/config.py. See https://github.com/epinna/weevely3/blob/master/core/config.py#L32

At the bottom of config.py but before the DO NOT CHANGE LINE, I would add something like

import cfscrape

cookie = cfscrape.get_cookie_string("http://somesite.com")
additional_headers.append(("Cookie", cookie))

from cloudflare-scrape.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.