Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

每个网站都不一样,如果以下方式都不能解决问题,烦请您自己多研究研究,您可以的。

 

第一种:通过样式来判断版本

如果出现以下这种需要勾选的,可以判断为reCaptcha v2

但是不是普通版还是企业版需要进一步判断

可以点击这里查看reCaptcha v2 普通版https://www.google.com/recaptcha/api2/demo

还有一种reCaptcha v2 invisible 隐形版https://www.google.com/recaptcha/api2/demo?invisible=true

这种版本不显示图标勾选,但是可以当成reCaptcha v2 普通版来对待

 

如果在右下角有一个小图标,鼠标移上去之后还会弹出以下图片,可以判断为reCaptcha v3

注意:reCaptcha v2 普通版也是相同的图标与样式,请注意区分。

但是不是普通版还是企业版需要进一步判断

reCaptcha v3 是一种无感验形式,不需要用户点击验证,会自动进行验证的形式

谷歌根据用户的各种行为因素,对用户进行打分,分数从0.1~0.9不等,分数越大越接近人类

网站会根据用户的分数来判断是否给予通过

点击这里查看你的分数(点击中间的交通图标):https://recaptcha-demo.appspot.com/recaptcha-v3-request-scores.php

{
  "success": true,
  "hostname": "recaptcha-demo.appspot.com",
  "challenge_ts": "2021-10-15T13:56:10Z",
  "apk_package_name": null,
  "score": 0.9,
  "action": "examples/v3scores",
  "error-codes": []
}

 

第二种:通过浏览器控制台Network发送的请求进行判断

打开网页,按F12->Network,

1、判断普通版,搜索关键词api.js

reCaptcha v2 普通版:请求链接不含render参数,或者render参数为explicit,例如:

https://www.google.com/recaptcha/api.js
https://www.google.com/recaptcha/api.js?onload=onloadcallback&render=explicit

reCaptcha v2 isInvisible版本 :符合上述条件,并且anchor的url中有size=invisible参数,则可能为isvisible版本

https://www.google.com/recaptcha/api2/anchor?ar=1&k=6LdDCdYcAAAAANPaWKlIKYBRPNQirZFckBZKgZzj&co=aHR0cHM6Ly91bnVzdWFsd2hhbGVzLmNvbTo0NDM.&hl=en-US&type=image&v=5qcenVbrhOy8zihcc2aHOWD4&theme=light&size=invisible&badge=bottomright&cb=sym595bmbzux

注意:v2的invisable版本有时候需要使用v3接口来过,有时候用v2就可以过,可以都尝试一下。

 

reCaptcha v3 普通版:请求链接含有render参数,并且render参数不等于explicit,例如:

https://www.google.com/recaptcha/api.js?render=6LdyC2cUAAAAACGuDKpXeDorzUDWXmdqeg-xy696

2、判断企业版,搜索关键词enterprise.js

reCaptcha v2 企业版:请求链接不含render参数,或者render参数为explicit,例如:

https://recaptcha.net/recaptcha/enterprise.js?render=explicit&hl=zh-cn

reCaptcha v3 企业版:请求链接含有render参数,并且render参数不等于explicit,例如:

https://www.google.com/recaptcha/enterprise.js?render=6LeP9okbAAAAANjfmUxqLDJvHZtqvXr_Fg34FhP-

 

第三种:通过插件自动识别

首先阅读插件教程,安装好插件:https://yescaptcha.atlassian.net/wiki/spaces/YESCAPTCHA/pages/9011201

通过浏览器按F12键->console界面,观察createTask发送的请求参数

识别参数直接就包含了全部需要获取的参数以及版本

全部版本点这里:https://yescaptcha.atlassian.net/wiki/spaces/YESCAPTCHA/pages/164286

{
	"clientKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
	"task": {
		"websiteURL": "https://www.google.com/",
		"websiteKey": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-",
		"type": "NoCaptchaTaskProxyless" // 这里是版本
	}
}

 

第四种:通过自动识别函数获取信息

按F12,进入console, 输入自动定义函数findRecaptchaClients()

function findRecaptchaClients() {
  // eslint-disable-next-line camelcase
  if (typeof (___grecaptcha_cfg) !== 'undefined') {
    // eslint-disable-next-line camelcase, no-undef
    return Object.entries(___grecaptcha_cfg.clients).map(([cid, client]) => {
      const data = { id: cid, version: cid >= 10000 ? 'V3' : 'V2' };
      const objects = Object.entries(client).filter(([_, value]) => value && typeof value === 'object');

      objects.forEach(([toplevelKey, toplevel]) => {
        const found = Object.entries(toplevel).find(([_, value]) => (
          value && typeof value === 'object' && 'sitekey' in value && 'size' in value
        ));
     
        if (typeof toplevel === 'object' && toplevel instanceof HTMLElement && toplevel['tagName'] === 'DIV'){
            data.pageurl = toplevel.baseURI;
        }
        
        if (found) {
          const [sublevelKey, sublevel] = found;

          data.sitekey = sublevel.sitekey;
          const callbackKey = data.version === 'V2' ? 'callback' : 'promise-callback';
          const callback = sublevel[callbackKey];
          if (!callback) {
            data.callback = null;
            data.function = null;
          } else {
            data.function = callback;
            const keys = [cid, toplevelKey, sublevelKey, callbackKey].map((key) => `['${key}']`).join('');
            data.callback = `___grecaptcha_cfg.clients${keys}`;
          }
        }
      });
      return data;
    });
  }
  return [];
}
findRecaptchaClients()

然后在consolse执行这个函数findRecaptchaClients() 即可找到出对应的信息

其中,version字段为版本

[
    {
        "id": "0",
        "version": "V2",
        "sitekey": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-",
        "function": "onSuccess",
        "callback": "___grecaptcha_cfg.clients['0']['l']['l']['callback']",
        "pageurl": "https://www.google.com/recaptcha/api2/demo"
    }
]

如下图

 

 

  • No labels