From 64666dd46f5a4fba1eb41ac9efd94e09c0d03abe Mon Sep 17 00:00:00 2001 From: MatthiasHeinz <7958945+MatthiasHeinz@users.noreply.github.com> Date: Mon, 1 Aug 2022 19:49:17 +0200 Subject: [PATCH 1/6] Update index.js Saves one character in the input, but does not effect the output. Using a RegEx-escapable character (e.g. '{'), that does not need to be escaped like the backslash saves one character in the argument, but it does not effect the output, because the generated string would be '\\' prior to or '\{' after the change. Other possibilities, that work and are allowed according to the whitelisted charset would be: }[]()/+ --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index adfa9dd..408d82f 100644 --- a/index.js +++ b/index.js @@ -34,7 +34,7 @@ map.n = `((+!![]/+[])+[])[${number(4)}]`; map.S = `([]+([]+[])[${fromString('constructor')}])[${number(9)}]`; map.g = `([]+([]+[])[${fromString('constructor')}])[${number(14)}]`; map.p = `([]+(/-/)[${fromString('constructor')}])[${number(14)}]`; -map['\\'] = `(/\\\\/+[])[${number(1)}]`; +map['\\'] = `(/\\{/+[])[${number(1)}]`; map.d = `(${number(13)})[${fromString('toString')}](${number(14)})`; map.h = `(${number(17)})[${fromString('toString')}](${number(18)})`; map.m = `(${number(22)})[${fromString('toString')}](${number(23)})`; From b61b6b531ccd17ee20796140537ee6760beefe7f Mon Sep 17 00:00:00 2001 From: MatthiasHeinz <7958945+MatthiasHeinz@users.noreply.github.com> Date: Mon, 1 Aug 2022 20:01:36 +0200 Subject: [PATCH 2/6] Improving the string length for the letter 't' Cutting down the string length for the letter 't' from 54 characters: '[object Object]'[6] -> '({}+[])[+!![] + +!![] + +!![] + +!![] + +!![] + +!![]]' to 14 characters: 'true'[0] -> '(!!{}+[])[+[]]' --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 408d82f..21766fd 100644 --- a/index.js +++ b/index.js @@ -23,7 +23,7 @@ map.b = `({}+[])[${number(2)}]`; map.o = `({}+[])[${number(1)}]`; map.e = `({}+[])[${number(4)}]`; map.c = `({}+[])[${number(5)}]`; -map.t = `({}+[])[${number(6)}]`; +map.t = `(!![]+[])[${zero}]`; map[' '] = `({}+[])[${number(7)}]`; map.f = `(![]+[])[${number(0)}]`; map.s = `(![]+[])[${number(3)}]`; From e4fbdaeba95f52453a898340e5f72b148da3bbd1 Mon Sep 17 00:00:00 2001 From: MatthiasHeinz <7958945+MatthiasHeinz@users.noreply.github.com> Date: Mon, 1 Aug 2022 20:07:27 +0200 Subject: [PATCH 3/6] Update index.js Unified the way "0" is being expressed. --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 21766fd..bc6c0b8 100644 --- a/index.js +++ b/index.js @@ -23,7 +23,7 @@ map.b = `({}+[])[${number(2)}]`; map.o = `({}+[])[${number(1)}]`; map.e = `({}+[])[${number(4)}]`; map.c = `({}+[])[${number(5)}]`; -map.t = `(!![]+[])[${zero}]`; +map.t = `(!![]+[])[${number(0)}]`; map[' '] = `({}+[])[${number(7)}]`; map.f = `(![]+[])[${number(0)}]`; map.s = `(![]+[])[${number(3)}]`; From 4d7e85681ca114103ccf9ef8b9ee3ec1bc8ef9e7 Mon Sep 17 00:00:00 2001 From: MatthiasHeinz <7958945+MatthiasHeinz@users.noreply.github.com> Date: Mon, 1 Aug 2022 20:35:13 +0200 Subject: [PATCH 4/6] Improving the string length for the letter 'e' Cutting down the string length for the letter 'e' from 38 characters: '[object Object]'[4] -> '({}+[])[+!![] + +!![] + +!![] + +!![]]' to 32 characters: 'true'[3] -> '(!![]+[])[+!![] + +!![] + +!![]]' --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index bc6c0b8..dbeed81 100644 --- a/index.js +++ b/index.js @@ -21,7 +21,7 @@ const fromString = s =>s.split('').map(x => { map.a = `(+{}+[])[${number(1)}]`; map.b = `({}+[])[${number(2)}]`; map.o = `({}+[])[${number(1)}]`; -map.e = `({}+[])[${number(4)}]`; +map.e = `(!![]+[])[${number(3)}]`; map.c = `({}+[])[${number(5)}]`; map.t = `(!![]+[])[${number(0)}]`; map[' '] = `({}+[])[${number(7)}]`; From 98a8a422da37a9de94ec9d03d3c4b43e300d2ede Mon Sep 17 00:00:00 2001 From: MatthiasHeinz <7958945+MatthiasHeinz@users.noreply.github.com> Date: Mon, 1 Aug 2022 20:44:01 +0200 Subject: [PATCH 5/6] Improving the string length for the letter 'n' Cutting down the string length for the letter 'n' from 47 characters: 'Infinity'[4] -> '((+!![]/+[])+[])[+!![] + +!![] + +!![] + +!![]]' to 23 characters: 'Infinity'[1] -> '((+!![]/+[])+[])[+!![]]' --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index dbeed81..35a834f 100644 --- a/index.js +++ b/index.js @@ -30,7 +30,7 @@ map.s = `(![]+[])[${number(3)}]`; map.r = `(!![]+[])[${number(1)}]`; map.u = `(!![]+[])[${number(2)}]`; map.i = `((+!![]/+[])+[])[${number(3)}]`; -map.n = `((+!![]/+[])+[])[${number(4)}]`; +map.n = `((+!![]/+[])+[])[${number(1)}]`; map.S = `([]+([]+[])[${fromString('constructor')}])[${number(9)}]`; map.g = `([]+([]+[])[${fromString('constructor')}])[${number(14)}]`; map.p = `([]+(/-/)[${fromString('constructor')}])[${number(14)}]`; From 5e010d57e36e7e14992a3f38fee0d1d3a66e70be Mon Sep 17 00:00:00 2001 From: MatthiasHeinz <7958945+MatthiasHeinz@users.noreply.github.com> Date: Mon, 1 Aug 2022 21:07:23 +0200 Subject: [PATCH 6/6] Improving the string length for the letter 'm' Cutting down the string length for the letter 'm' from 1233 characters: (22).toString(23) -> '(+!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![])[(!![]+[])[+[]]+({}+[])[+!![]]+([]+([]+[])[({}+[])[+!![] + +!![] + +!![] + +!![] + +!![]]+({}+[])[+!![]]+((+!![]/+[])+[])[+!![]]+(![]+[])[+!![] + +!![] + +!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+(!![]+[])[+!![] + +!![]]+({}+[])[+!![] + +!![] + +!![] + +!![] + +!![]]+(!![]+[])[+[]]+({}+[])[+!![]]+(!![]+[])[+!![]]])[+!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+((+!![]/+[])+[])[+!![] + +!![] + +!![]]+((+!![]/+[])+[])[+!![]]+([]+([]+[])[({}+[])[+!![] + +!![] + +!![] + +!![] + +!![]]+({}+[])[+!![]]+((+!![]/+[])+[])[+!![]]+(![]+[])[+!![] + +!![] + +!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+(!![]+[])[+!![] + +!![]]+({}+[])[+!![] + +!![] + +!![] + +!![] + +!![]]+(!![]+[])[+[]]+({}+[])[+!![]]+(!![]+[])[+!![]]])[+!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![]]](+!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![])' to 367 characters: ([]+(0)['constructor'])[11] -> '([]+(+[])[({}+[])[+!![] + +!![] + +!![] + +!![] + +!![]]+({}+[])[+!![]]+((+!![]/+[])+[])[+!![]]+(![]+[])[+!![] + +!![] + +!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+(!![]+[])[+!![] + +!![]]+({}+[])[+!![] + +!![] + +!![] + +!![] + +!![]]+(!![]+[])[+[]]+({}+[])[+!![]]+(!![]+[])[+!![]]])[+!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![] + +!![]]' --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 35a834f..8adf563 100644 --- a/index.js +++ b/index.js @@ -37,7 +37,7 @@ map.p = `([]+(/-/)[${fromString('constructor')}])[${number(14)}]`; map['\\'] = `(/\\{/+[])[${number(1)}]`; map.d = `(${number(13)})[${fromString('toString')}](${number(14)})`; map.h = `(${number(17)})[${fromString('toString')}](${number(18)})`; -map.m = `(${number(22)})[${fromString('toString')}](${number(23)})`; +map.m = `([]+(+[])[${fromString('constructor')}])[${number(11)}]`; // using the string 'function Number' to extract the 'm' map.C = `((()=>{})[${fromString('constructor')}](${fromString('return escape')})()(${map['\\']}))[${number(2)}]`; const compile = code => `(()=>{})[${fromString('constructor')}](${fromString(code)})()`;