Last active
February 20, 2018 01:36
-
-
Save beshanoe/b41b6aece45f54e057b64bef1c970d8d to your computer and use it in GitHub Desktop.
aem1k symmetry explanation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// I've passed the original symmetrical code through the Prettier | |
// Most of the lines do nothing but make code look symmetrical | |
// Still it's amazing :) | |
{ | |
0.0 - {} - 0 | |
} | |
xXXx = wYYw = // 'alert(xXXx)' | |
([] + !!+[])[0 ** 0.0] + // 'a' | |
[[]] + // '' | |
('' + !!+'')[0 - ~+!!+~-0] + // 'l' | |
([] + [] + []) + // '' | |
(8 + {} + 8)[0 | (8 ** 0.8) | 0] + // 'e' | |
([] || []) + // '' | |
('' + (0 == 0) + '')[0 ** 0.0] + // 'r' | |
[] + // '' | |
'' + // '' | |
[] + // '' | |
(0 + {} + 0)[8 - !!-8] + // 't' | |
('' || '') + // '' | |
('(' + [] + ')')[0 + ~~+0] + // '(' | |
'' + // '' | |
'' + // '' | |
'' + // '' | |
['xXXx'][0 + ~~+0] + // 'xXXx' | |
[''] + // '' | |
')YY('['' + ~~+''] // ')' | |
;[{}] | |
{ | |
{ | |
;[] | |
} | |
} | |
xx = AvvA = // 'constuctor' | |
(0.8 + {} + 8)[8 || 0.8] + // 'c' | |
('' || '') + // '' | |
('o' || 'o')['' + ~~+''] + // 'o' | |
[''] + // '' | |
('' + [8][8] + '')[0 ** 0.0] + // 'n' | |
('' + [] + '') + // '' | |
('xX' + !!+'Xx')[0 | (8 ** 0.8) | 0] + // 's' | |
[[]] + // '' | |
(0.8 + {} + 8)[8 + ~~+8] + // 't' | |
('' || '') + // '' | |
('' + [8 == 8] + '')[0 ** 0.0] + // 'r' | |
[''] + // '' | |
('' + [8][8] + '')['' + ~~+''] + // 'u' | |
'' + // '' | |
'' + // '' | |
'' + // '' | |
(0.8 + {} + 8)[8 || 0.8] + // 'c' | |
([] + [] + []) + // '' | |
(0 + {} + 0)[8 - !!-8] + // 't' | |
[''] + // '' | |
('o' || 'o')['' + ~~+''] + // 'o' | |
('' + [] + '') + // '' | |
('' + [8 == 8] + '')[0 ** 0.0] // 'r' | |
;[, {}] | |
;[xx][AvvA][xx](wYYw)([] ** []) // ['constructor']['constructor']['constructor']('alert(xXXx)')(1) | |
// ['constructor'] returns array object | |
// ['constructor']['constructor'] here we get 'contructor' field of this array which is Array() function | |
// ['constructor']['constructor']['constructor'] then we get 'contructor' of Array function which is Function() function | |
// When we call Function with 'alert(xXXx)' argument it returns actual function which executes 'alert(xXXx)' line | |
// Then we call it :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment