36 lines
1.1 KiB
JavaScript
36 lines
1.1 KiB
JavaScript
/**
|
|
* 检查 Unicode 转义序列
|
|
*/
|
|
const fs = require('fs');
|
|
|
|
const inputPath = 'D:/temp/破解/cursorpro-0.4.5/deobfuscated_full/extension/out/webview/provider.js';
|
|
const code = fs.readFileSync(inputPath, 'utf8');
|
|
|
|
// 查找 Unicode 转义 \uXXXX
|
|
const unicodeRegex = /\\u[0-9a-fA-F]{4}/g;
|
|
const unicodeMatches = code.match(unicodeRegex) || [];
|
|
console.log('Unicode 转义数量:', unicodeMatches.length);
|
|
|
|
if (unicodeMatches.length > 0) {
|
|
const unique = [...new Set(unicodeMatches)];
|
|
console.log('唯一值:', unique.slice(0, 30).join(', '));
|
|
|
|
// 找到包含 Unicode 的行
|
|
const lines = code.split('\n');
|
|
let count = 0;
|
|
lines.forEach((line, i) => {
|
|
if (unicodeRegex.test(line) && count < 10) {
|
|
console.log(`行 ${i+1}: ${line.substring(0, 150)}...`);
|
|
count++;
|
|
unicodeRegex.lastIndex = 0;
|
|
}
|
|
});
|
|
}
|
|
|
|
// 检查是否有中文字符
|
|
const chineseCount = (code.match(/[\u4e00-\u9fff]/g) || []).length;
|
|
console.log('\n中文字符数量:', chineseCount);
|
|
|
|
// 文件大小
|
|
console.log('文件大小:', (code.length / 1024).toFixed(2), 'KB');
|