听说 ReCaptcha 可以读取某人计算机上所有的扩展程序(或 tampermonkey 脚本),有办法规避吗?无论是任何类型的脚本、代码片段还是设置。
这个理论得到了证实:只要使用 Chrome Automation Extension 在任何网站中登录,就会立即触发验证码。即使它只是为另一个与 Recaptcha 无关的任务公开 Chrome Options 的 API。仅加载带有 ReCaptcha 的任何网页(站点)就会触发验证码。
这是 background.js 文件,如何更改它以对其他应用程序不可察觉?
这个理论得到了证实:只要使用 Chrome Automation Extension 在任何网站中登录,就会立即触发验证码。即使它只是为另一个与 Recaptcha 无关的任务公开 Chrome Options 的 API。仅加载带有 ReCaptcha 的任何网页(站点)就会触发验证码。
这是 background.js 文件,如何更改它以对其他应用程序不可察觉?
// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/*
* Checks for an extension error that occurred during the asynchronous call.
* If an error occurs, will invoke the error callback and throw an exception.
*
* @param {function(!Error)} errCallback The callback to invoke for error
* reporting.
*/
function checkForExtensionError(errCallback) {
if (typeof(chrome.extension.lastError) != 'undefined') {
var error = new Error(chrome.extension.lastError.message);
errCallback(error);
throw error;
}
}
/**
* Captures a screenshot of the visible tab.
*
* @param {function(string)} callback The callback to invoke with the base64
* encoded PNG.
* @param {function(!Error)} errCallback The callback to invoke for error
* reporting.
*/
function captureScreenshot(callback, errCallback) {
chrome.tabs.captureVisibleTab({format:'png'}, function(dataUrl) {
if (chrome.extension.lastError &&
chrome.extension.lastError.message.indexOf('permission') != -1) {
var error = new Error(chrome.extension.lastError.message);
error.code = 103; // kForbidden
errCallback(error);
return;
}
checkForExtensionError(errCallback);
var base64 = ';base64,';
callback(dataUrl.substr(dataUrl.indexOf(base64) + base64.length))
});
}
/**
* Launches an app with the specified id.
*
* @param {string} id The ID of the app to launch.
* @param {function()} callback Invoked when the launch event is complete.
* @param {function(!Error)} errCallback The callback to invoke for error
* reporting.
*/
function launchApp(id, callback, errCallback) {
chrome.management.launchApp(id, function() {
checkForExtensionError(errCallback);
callback();
});
}
清单:
{
"key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDr+Q7QFcTr4Wmn9sSICKWbxnYLhIM0ERbcapZCDmpAkiBUhOPt+KkYnTdUFl4Kx2xv02MwIowh36Fho9Dhqh7cPWGIPsLHUaJosO6t6oaHxQsMQS/K4MlnP5pNJykExo82DcajSXGV+mIQH3RslxL+XhtmIh2BQLwbizVG0bA+mwIDAQAB",
"name": "Chrome Automation Extension",
"version": "1",
"manifest_version": 2,
"description": "Exposes extension APIs for automating Chrome",
"background": {
"scripts": ["background.js"]
},
"permissions": [
"tabs", "management", "<all_urls>"
]
}