Eltik / Puppeteer-Bypass

Bypassing CloudFlare's anti-bot challenge with Puppeteer optimizations
60 stars 8 forks source link

Bypass Failed (CloudFlare Captcha) #2

Open para-dise opened 1 year ago

para-dise commented 1 year ago

Hi,

It seems that with the latest version of Puppeteer-Bypass CloudFlare is not successfully being bypassed.

Here is the code I used

const API = require("./node_modules/Puppeteer-Bypass/built/API").default;
const bypass = new API();

(
    async () => {
        const result = await bypass.request("https://www.spigotmc.org/resources/", { method: "GET",
            headers: {
                Referer: "https://www.spigotmc.org/resources/1",
                "User-Agent": "randomuseragent", // PLEASE NOTE THAT THIS WILL GET OVERWRITTEN
                Cookie: "value1=lol;value2=something", // THIS ALSO WILL GET OVERWRITTEN
                "X-Requested-With": "XMLHttpRequest",
                "Content-Type": "applicatipn/json",
                Accept: "application/json"
            }
        });

        console.log(result);
    }
)();

The result is CloudFlare prompting either "Verify Now" or a CF Captcha, resulting in

Puppeteer-Bypass\built\API.js:176
                throw new Error('stuck');
                      ^

Error: stuck
para-dise commented 1 year ago

As a side note, the test also fails for the same reason.

Eltik commented 1 year ago

Thanks for the bug report! Unfortunately captchas can't be bypassed at the moment (I forgot to update the README). However, if you complete the captcha yourself it shouldn't appear again. I'll need to do some testing.