Qwen2API-A / scripts /fingerprint-injector.js
github-actions[bot]
Sync from GitHub Viciy2023/Qwen2API-A@ae093476e9bc5b0a599620b5925df3a20057038e
f120063
raw
history blame contribute delete
676 Bytes
(function() {
// 拦截 String.prototype.charAt
const originalCharAt = String.prototype.charAt;
let capturedData = null;
String.prototype.charAt = function(index) {
if (this.length > 200 && this.includes('^') && !capturedData) {
const fields = this.split('^');
if (fields.length === 37) {
capturedData = this.toString();
console.log('\n=== 检测到浏览器指纹 ===');
console.log(capturedData);
// 恢复原方法
String.prototype.charAt = originalCharAt;
}
}
return originalCharAt.call(this, index);
};
})();