codemanki / cloudscraper

--DEPRECATED -- πŸ›‘ πŸ›‘ Node.js library to bypass cloudflare's anti-ddos page
MIT License
599 stars 139 forks source link

function onCaptcha looping #331

Closed narra-dev closed 4 years ago

narra-dev commented 4 years ago
Code snippet ```js var cloudscraper = require("cloudscraper").defaults({ onCaptcha });; function onCaptcha (options, response, body) { let gRes; const captcha = response.captcha; console.log('loopcheck'); //I do manualy solve the captcha and paste a validation token here for testing purposes gRes = '03AERD8XrC05QbUdvwuXQURT6uVQ5OyfSzH63VKKNsgJX8whswwK81y_DqO4ncsUjLe4aIG8XrumF43Skbo2RbdA8EnJza-rpebwYwlSk2WQLh1Ylpd2tHlqeXt4b--0hjIXzx9O22BxiuUK0SzePfgHObVishFisOE9mU5qOcdHf6VFStRCUiW6n0oKXCcAkCdqB1a_Vjd6Y4beXyTdsiiCB7_QhVR2zKd8BNtg-miAPR6vo6cYlx6bc'; captcha.form['g-recaptcha-response'] = gRes; captcha.submit(); } var options = { uri: 'https://marketplace.tf/', }; cloudscraper.get(options, function(error, response, body) { console.log(body); }); ```

I never get Cloudflare challenge loop error but the code never exits out of onCaptcha loop. Here's siteKey if you are to try yourself 6LfBixYUAAAAABhdHynFUIMA_sa4s-XsJvnjtgB0

TaquitoSlayer commented 4 years ago

yay it’s not just me

gmmanonymus111 commented 4 years ago

Same with backpack.tf :/ I use 9kw to get the response, but after submiting the captcha, it asks again for a new response.

narra-dev commented 4 years ago

in my case there was an error in solving captcha

TaquitoSlayer commented 4 years ago

Can you elaborate on your error? This issue is still very much alive.

narra-dev commented 4 years ago

Can you elaborate on your error? This issue is still very much alive.

The error was in my custom api wrapper for captcha solving service. g-res token was corrupted. After I made sure it was passed correctly it started working