/const fs = require('fs'); fs.readFile('antybot.js', 'utf8', (err, file) => { if (err) {…
- User
/*const fs = require('fs');
fs.readFile('antybot.js', 'utf8', (err, file) => { if (err) { console.error('Error reading file:', err); return; }
const regex = /, (function() {/; const match = file.match(regex); if (match) { let modifiedString = file.slice(0, match.index + match[0].length); modifiedString = modifiedString.replace(regex, '), (function(){})') executeDecodedFunction(modifiedString); } else { console.error('Function not found in file.'); } });
function executeDecodedFunction(functionObject) { const functionRegex = /function\s*([^(]+)/; const match = functionObject.match(functionRegex); if (match) { const functionName = match[1]; eval(functionObject); eval(
console.log(${functionName}(0x12c, '7UGv'))); } }*/ const fs = require('fs'); fs.readFile('./antybot.js', 'utf-8', (err, data) => { if (err) { console.error(err); return; }code// Wyciągnięcie wszystkich funkcji const functionRegex = /(\w+)\s*=\s*function\s*\(([^)]*)\)\s*{\s*([^}]*)\s*}/gm; const arrayRegex = /\bfunction\s+(\w+)\s*\([^)]*\)\s*{\s*const\s+\w+\s*=\s*(\[[^\]]*\])/; while ((functionMatch = functionRegex.exec(data)) !== null) { const functionDeclaration = functionMatch[0]; const functionName = functionMatch[1] || 'anonimowa'; const functionBody = functionMatch[3]; if (functionBody.includes("GET_FP['fp']")) { console.log(`Nazwa funkcji z frazą GET_FP['fp']:`, functionName); } if (arrayRegex.test(functionBody)) { console.log('Nazwa funkcji zawierającej tablicę:', functionName); } }}); Popraw arrayRegex, tak by wykrywał tą funkcje w założeniu że jej nazwa jest dynamicznie generowana function a0_0x4ec7() { const _0x367983 = ['vXFcMCowW5ZcTW', 'WORdImooWQi6cSkF','vvhdUmo2w0Ty', 'emkUWRNcRJKRWRBdTSkK', 'W5pdVYWRWP0VWRa', 'iSo1W4r3WPlcNCkOWRSh',]; a0_0x4ec7 = function() { return _0x367983; }; return a0_0x4ec7();
- Assistant
You can use the following regex to capture also dynamically generated function names:
javascriptconst arrayRegex = /\bfunction\s+(\w+)?\s*\([^)]*\)\s*{\s*const\s+\w+\s*=\s*(\[[^\]]*\])/;This regex will now also match function names that are dynamically generated (not just hard-coded names).