SelfDefendingTemplate.ts 655 B

123456789101112
  1. import { Utils } from 'app/Utils';
  2. /**
  3. * @returns {string}
  4. */
  5. export function SelfDefendingTemplate (): string {
  6. return `(function () {
  7. var func = function(){return 'dev';};
  8. !Function(${Utils.stringToUnicode(`return/\\w+ *\\(\\) *{\\w+ *['|"].+['|"];? *}/`)})().test(func.toString()) ? []['filter']['constructor'](${Utils.stringToJSFuck('while')} + '(true){}')() : Function('a', 'b', 'a(++b)')({whileFunctionName}, {timesName}) ? []['filter']['constructor'](${Utils.stringToJSFuck('while')} + '(false){}')() : []['filter']['constructor'](${Utils.stringToJSFuck('while')} + '(false){}')();
  9. })();`;
  10. }