Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A better way of getting A #128

Closed
49b opened this issue Sep 26, 2022 · 2 comments
Closed

A better way of getting A #128

49b opened this issue Sep 26, 2022 · 2 comments

Comments

@49b
Copy link

49b commented Sep 26, 2022

Running a function in Array.prototype and converting its output to string results in a string with the letter A.

Before:

(+[]+[]["constructor"])[10]

(+[]+[][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]


After:

([]["entries"]()+[])[8]

([][(![]+[])[!+[]+!+[]+!+[]+!+[]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[!+[]+!+[]+!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()+[])[!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]

@hazzik
Copy link
Contributor

hazzik commented Sep 26, 2022

This should be even smaller:

(NaN+[]["entries"]())[11]

@hazzik
Copy link
Contributor

hazzik commented Sep 26, 2022

Actually, this is how it is already done in the master:

'A': '(NaN+[]["entries"]())[11]',

It was done in #110

I think this can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants