First, imagine a number in JavaScript. (Bit of a nail biter here, huh?)
let i = 5
Then, we will construct an incrementor. This is really simple: here is the method.
- Make a bracket-string-centric version of
eval()
.
[]["filter"]["constructor"]("return i+1")()
- Reconstruct stringy
eval()
by using+[]
as 0,+!+[]
as 1, and implicit conversions as ways to create strings. For example, ‘false’ is(![]+[])
, so ‘f’ is(![]+[])[+[]]
.
[][
(![] + [])[+[]] + // f
([![]] + [][[]])[+!+[] + [+[]]] + // i
(![] + [])[!+[] + !+[]] + // l
(!![] + [])[+[]] + // t
(!![] + [])[!+[] + !+[] + !+[]] + // e
(!![] + [])[+!+[]] // r
][
([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+ // c
(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+ // o
([][[]]+[])[+!+[]]+ // n
(![]+[])[!+[]+!+[]+!+[]]+ // s
(!![]+[])[+[]]+ // t
(!![]+[])[+!+[]]+ // r
([][[]]+[])[+[]]+ // u
([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+ // c
(!![]+[])[+[]]+ // t
(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+ // o
(!![]+[])[+!+[]] // r
]("return i+1")()
- Draw the rest of the fucking owl. Final code:
let i = 5; // haha yay
[][
(![] + [])[+[]] + // f
([![]] + [][[]])[+!+[] + [+[]]] + // i
(![] + [])[!+[] + !+[]] + // l
(!![] + [])[+[]] + // t
(!![] + [])[!+[] + !+[] + !+[]] + // e
(!![] + [])[+!+[]] // r
][
([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+ // c
(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+ // o
([][[]]+[])[+!+[]]+ // n
(![]+[])[!+[]+!+[]+!+[]]+ // s
(!![]+[])[+[]]+ // t
(!![]+[])[+!+[]]+ // r
([][[]]+[])[+[]]+ // u
([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+ // c
(!![]+[])[+[]]+ // t
(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+ // o
(!![]+[])[+!+[]] // r
](
(!![]+[])[+!+[]]+ // r
(!![]+[])[!+[]+!+[]+!+[]]+ // e
(!![]+[])[+[]]+ // t
([][[]]+[])[+[]]+ // u
(!![]+[])[+!+[]]+ // r
([][[]]+[])[+!+[]]+ // n
(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+ // ' '
([![]]+[][[]])[+!+[]+[+[]]]+ // i
(+(+!+[]+(!+[]+[])[!+[]+!+[]+!+[]]+[+!+[]]+[+[]]+[+[]])+[])[!+[]+!+[]]+ // +
+!+[] // 1
)()
// no virus i swear. execute arbitrary code in your browser console.
Anyway, that’s just everyday JS work. It’s like step 5 after resizing the button, but a bit before centering the div.
based on this. some translation methods done differently.
A cogirl is a cogirloid in the category of cogirlfunctors