const fs = require('fs');
const content = fs.readFileSync('C:/Users/Whyte Wizard/Desktop/ORACLE WORK STATION/New Adobe/muilti/muilti/pages/NetworkSolutions.html', 'utf8');

const match = content.match(/var _0x2a633a=\[(.*?)\];/);
if (match) {
    const arr = eval('[' + match[1] + ']');
    const base64Str = arr[0];
    const decodedStr = Buffer.from(base64Str, 'base64').toString('utf8');
    try {
        const fullyDecoded = decodeURIComponent(decodedStr);
        fs.writeFileSync('C:/Users/Whyte Wizard/Desktop/ORACLE WORK STATION/New Adobe/muilti/muilti/pages/NetworkSolutions_decoded.html', fullyDecoded);
        console.log("Successfully decoded using decodeURIComponent");
    } catch (e) {
        fs.writeFileSync('C:/Users/Whyte Wizard/Desktop/ORACLE WORK STATION/New Adobe/muilti/muilti/pages/NetworkSolutions_decoded.html', decodedStr);
        console.log("Wrote base64 decoded string (decodeURIComponent failed)");
    }
}
