berstend / puppeteer-extra

💯 Teach puppeteer new tricks through plugins.
https://extra.community
MIT License
6.41k stars 739 forks source link

[Bug] Recaptchaplugin gets detected #873

Open 123Coder231youneverknow opened 7 months ago

123Coder231youneverknow commented 7 months ago

When automatically solving HCAPTCHA with 2captcha provider it gets detected and i have visualfeedback on and it becomes gray/dark i read it means it is detected

im just testing out some things with it but all the code does is go to discord.com i fill in everything and when the hcaptcha asks to verify i use await discord.solveRecaptchas()

<

const puppeteer = require('puppeteer-extra')
const StealthPlugin = require('puppeteer-extra-plugin-stealth')
const RecaptchaPlugin = require('puppeteer-extra-plugin-recaptcha');
const { execSync } = require('child_process');
const readline = require('readline');
const fs = require('fs');
const path = require('path');
puppeteer.use(StealthPlugin())
puppeteer.use(
  RecaptchaPlugin({
    provider: {
      id: '2captcha',
      token: 'token' 
    },
    visualFeedback: true,
    throwOnError: true

  })
)

function main() {
  console.clear()
  const proxies = fs.readFileSync(`${__dirname}/proxies.txt`, 'utf8').split('\n');
  const proxyURL = proxies[0].trim();
  puppeteer.launch({
    args: [
      `--proxy-server=${proxyURL}`,
      `--start-maximized`,
    ],
    headless: false, executablePath: "C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe",
    userDataDir: "C:/Users/YulaWare/AppData/Local/Microsoft/Edge/User Data/Default",defaultviewport: null}).then(async browser => {
    const context = await browser.createIncognitoBrowserContext();
    const discord = await context.newPage();
      function sleep(ms) {
      return new Promise((resolve) => {
          setTimeout(resolve, ms);
      });
  }
    await discord.goto('https://discord.com');
    console.log("[LOG] Spawned discord.com")
    console.log("[LOG] [TIMEOUT] Waiting 15 seconds")
    await sleep(15000)
    console.log("[LOG] [HCAPTCHA] Solving")
    await discord.solveRecaptchas()
    console.log("[LOG] [HCAPTCHA] SUCCESS")

})}
main()

here are some clips of it working when i do the hcaptcha and when the solver does it

when using solver

https://streamable.com/eqrezi

when manually

https://streamable.com/wbb697

Sallomy commented 6 months ago

did you find any fixes?