javascript-obfuscator
Version:
JavaScript obfuscator
23 lines (18 loc) • 619 B
text/typescript
/**
* SelfDefendingTemplate. Enters code in infinity loop.
*
* @returns {string}
*/
export function SelfDefendingNoEvalTemplate (): string {
return `
const {selfDefendingFunctionName} = {callControllerFunctionName}(this, function () {
{globalVariableTemplate}
const test = function () {
const regExp = new that.RegExp('^([^ ]+( +[^ ]+)+)+[^ ]}');
return !regExp.test({selfDefendingFunctionName});
};
return test();
});
{selfDefendingFunctionName}();
`;
}