peduajo / geetest-slice-captcha-solver

Solver for the geetest sliding captcha
140 stars 53 forks source link

Examples to work with #1

Open xispit4 opened 5 years ago

xispit4 commented 5 years ago

Hello, any example to work with a browser in real production ?

thanks

gigatoride commented 5 years ago

This is just an example in node.js using this repo with a headless browser:

      const piece = await this.page.$('your_piece_selector');
      const box = await piece.boundingBox();
      await page.mouse.move(box.x + box.width / 2, box.y + box.height / 2);
      await page.mouse.down();
      await page.waitFor(2000); // You need to wait at least 2 seconds to bypass antibot.
      await .page.mouse.move(
        box.x + Number(geetest_slice_captcha_solver_solution.toString()) + 32, // 32 for the rest piece pixels.!
        box.y,
        {
          steps: 10 // For some human sliding simulation
        }
      ); // move to coordinates
      await page.mouse.up();

In python, you can use pyppeteer for this simulation. Hope this helps.

xispit4 commented 5 years ago

Thank you for the answer, but I am don't have such skill yet, I am starting with Kantu to do browser automation and was thinking about try to use this captcha solver but I think I got it wrong and I can't do it directly there right only with headless browser ?

gigatoride commented 5 years ago

No, you can use this repo any application supports python execution. You have to read Kantu documentation for more information. Because I've no idea if it supports python or not. Moreover, you have to create an algorithm for the input like that one I've mentioned above.

xispit4 commented 5 years ago

Kantu is just an addon for Chrome/Firefox based on Selenium IDE https://chrome.google.com/webstore/detail/kantu-browser-automation/gcbalfbdmfieckjlnblleoemohcganoc

I have no skill to code so will be difficult to use this now, but thanks

wiliam-toney commented 3 years ago

Hello @gigatoride . I am very interesting in your code and I would appreciate a lot if you can share how did you get geetest_slice_captcha_solver_solution from this repo? I am also trying to run this repo on my Nodejs project. THanks

wiliam-toney commented 3 years ago

This is just an example in node.js using this repo with a headless browser:

      const piece = await this.page.$('your_piece_selector');
      const box = await piece.boundingBox();
      await page.mouse.move(box.x + box.width / 2, box.y + box.height / 2);
      await page.mouse.down();
      await page.waitFor(2000); // You need to wait at least 2 seconds to bypass antibot.
      await .page.mouse.move(
        box.x + Number(geetest_slice_captcha_solver_solution.toString()) + 32, // 32 for the rest piece pixels.!
        box.y,
        {
          steps: 10 // For some human sliding simulation
        }
      ); // move to coordinates
      await page.mouse.up();

In python, you can use pyppeteer for this simulation. Hope this helps.

Can you plz give me a code how did you get geetest_slice_captcha_solver_solution from this repo? On your Nodejs application.

BitSleek commented 2 years ago

@danielsGit you can use this python file and import it in your Node.js project with any node package.