S
S
Space Around2020-08-31 02:52:07
JavaScript
Space Around, 2020-08-31 02:52:07

How does ReCAPTCHA v3 determine that a bot is a bot?

How does ReCAPTCHA v3 determine that a bot is a bot?
I decided to write a bot using phantomjs and the casperjs library, added the viewport parameter, which is 1920x1080, added userAgent

spoiler
(Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.86 YaBrowser/20.8.0.903 Yowser/2.5 Safari/537.36)
but score is 0.1. After that, I decided to write a bot using selenium + firefox (despite the fact that the headless parameter is specified), where the score is 0.3, how so?
Received cookies from the 2nd bot and inserted them into the 1st (phantomjs). I also tried to monitor the network, but I did not notice any significant differences between firefox and phantomjs.

phantomjs
spoiler

var casper = require('casper').create({
    verbose: true,
    logLevel: "debug"
});

phantom.addCookie([
  {
    name: 'evohqq74u',
    value: 'rvavsej8kka27ocdogesqhkj87',
    path: '/',
    domain: 'antcpt.com',
    secure: true,
    httpOnly: true,
    sameSite: 'None'
  },
  {
    name: '_ym_uid',
    value: '159883072824193045',
    path: '/',
    domain: '.antcpt.com',
    secure: false,
    httpOnly: false,
    expiry: 1630366727,
    sameSite: 'None'
  },{
    name: '_ym_d',
    value: '1598830728',
    path: '/',
    domain: '.antcpt.com',
    secure: false,
    httpOnly: false,
    expiry: 1630366727,
    sameSite: 'None'
  },
  {
    name: '_ym_isad',
    value: '2',
    path: '/',
    domain: '.antcpt.com',
    secure: false,
    httpOnly: false,
    expiry: 1598902728,
    sameSite: 'None'
  },{
    name: '_ga',
    value: 'GA1.2.137458170.1598830728',
    path: '/',
    domain: '.antcpt.com',
    secure: false,
    httpOnly: false,
    expiry: 1661902728,
    sameSite: 'None'
  },
  {
    name: '_gid',
    value: 'GA1.2.1709358714.1598830728',
    path: '/',
    domain: '.antcpt.com',
    secure: false,
    httpOnly: false,
    expiry: 1598917128,
    sameSite: 'None'
  },{
    name: '_gat_gtag_UA_86572429_1',
    value: '1',
    path: '/',
    domain: '.antcpt.com',
    secure: false,
    httpOnly: false,
    expiry: 1598830788,
    sameSite: 'None'
  },
  {
    name: '_ym_visorc_40574825',
    value: 'w',
    path: '/',
    domain: '.antcpt.com',
    secure: false,
    httpOnly: false,
    expiry: 1598832528,
    sameSite: 'None'
  }
]);

casper.start();
casper.userAgent('Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.86 YaBrowser/20.8.0.903 Yowser/2.5 Safari/537.36');
casper.viewport(1920, 1080);

casper.thenOpen('https://antcpt.com/rus/information/demo-form/recaptcha-3-test-score.html', function(status) {
    this.wait(5000, function() {
        casper.capture('screenshot.png');
    });
});

casper.run();



selenium+firefox

spoiler

const {Builder} = require('selenium-webdriver');
const firefox = require('selenium-webdriver/firefox');
const until = require('selenium-webdriver/lib/until');

const screen = {
  width: 1240,
  height: 720
};

let option = new firefox.Options().headless().windowSize(screen);

let driver = new Builder()
    .forBrowser('firefox')
    .setFirefoxOptions(option)
    .build();

try {
    driver.get('https://antcpt.com/rus/information/demo-form/recaptcha-3-test-score.html').then(
        () => {

            driver.manage().getCookies()
            .then(result => {
                console.log(result);
            });
        }
    );
}
catch(e) {
    console.log(e);
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
kocherman, 2020-08-31
@viksnamax

In selenium over delete cdc_variables
https://stackoverflow.com/questions/33225947/can-a...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question