Javascript: noise that can run

Source: Internet
Author: User
Run the following javascript code to view my information. [Javascript] (+ [[] + (1 & lt; 1 & lt; 1 & lt; 1) + (1 ^ 1 & lt; 1) + (1 & lt; 1 & gt; 1) + (-~ 1 & lt; 1 & lt; 1) + (1.1 & gt; 1.1) + (11 & gt;


Run the following javascript code to view my information.

 

[Javascript]
(+ [[] + (1 <1 <1 <1) + (1 ^ 1 <1) + (1 <1> 1) + (-~ 1 <1 <1) + (1.1> 1.1) + (11> 1)]) [[(! /-/+ {}) [111 ^ 111] + [[] + {}] [! 1 &. 1] [1 | 1> 1 | 1] + ([111/[] + [] [+ (1> 1)] [([] + {}) [11-1> 1] + [[], [] + {} + [] [[] + 1] [1] + (/^/[1] + []) [1 | 1> 1 | 1] + [{}, 1e1 ,! {} + [] [1 + 1] [1 <1 ^ 1] + (11 /! {}+ {})[~ 1 + 1e1 + ~ 1] + [!! {} + {}] [[[] & 111] [1 & 1] + (/^/[111] + []) [11 ^ 11] + [{}, [{}] + {}, 1] [1 + [] [11 -~ 1 + 11> 1] + (!! 1 + {}) [1 & 1> 1] + ([] + {1:1} + []) [1 | 1] + [[] + !! 1] [111> 111] [1 <1> 1] + []) [([] +! [2, 111]) [1 | 1 <1 | 1] + [/= /, [] + [] [11] [1 | [] [1> 1] + ([{}] + {}) [1 + !! [1] + [1 ,! 1 + /~ /] [1% 11] [1 ^ 1 <1] + (111/[] + {})[~ 1 + 1e1 + ~ 1] + [!! /-/+/-/] [111% 111] [+ !! 1] (~ 1 + 1e1 + 1) + ((! 1 &. 1) = ([] + /-/[(!! [111] + {}) [1 ^ 1] + (!! [1] + []) [1 <1 ^ 1] + (! {} + {}) [1 ^ 1 <1] + (!! [1] +/-/) [+ (1> 1)]) [+ (1> 1)]), 1 -~ 1 <1)] (~ 1 -~ 1e1 <1 <1) + ":" + ([] = []) + /-/) [5] + ([] = []) +/-/) [5] + (+ [] + (1e1> 1) + (~ 1 + 1e1 + ~ 1) + (! 1 &. 1) + (111% 11) + (1 + 1 <1) + (1 <1 ^ 11> 1) + (1 <1 <1) + (~ 1 + 1e1 + 1) + (1> 1) + (+ []) + (~ 1-1 + 11) + (-~ 1 <1 <1) + (1 -~ 1 <1) + (~ 1 + 1e1)]) [[(! /-/+ []) [11 & [] + [[] + {11: 11} + [] [111> 111] [1 + [] + ([11 /! 1 +/1/] [1 & 1> 1] [([{}] + {}) [1e1> 1 | 1] + [[], [] + {11:111} + [] [1 | 1] [111% 11] + ([] + [] [11]) [1 <1> 1] + [{}, 1e1 ,! /~ /+ {}] [1 <1 ^ 1> 1] [1 <1 ^ 1] + ([] + 11 /! {})[~ 1 + 1e1 + ~ 1] + [!! [1, 111] + [] [1% 1] [1 & 1] + ([] + [] [111]) [. 1 ^! 1] + [{}, [] + {}, 1] [111% 11] [11 -~ 1 + 11> 1] + ([] + !! 1) [111> 111] + ([] + {} + []) [[] + 1] + [!! 1 + [] [1 ^ 1] [111% 11] + []) [(! 1 + {}) [1 ^ 1 <1] + [/= /, [] +/^/[11] [1 | [] [11.11> 11.11] + ([] + {} + []) [~~ (1.1 + 1.1)] + [1 ,! {} + /~ /] [1] [1 | 1 <1] + (1 /! {} + []) [~ 1 + 1e1 + ~ 1] + [!! [1] + {}] [111.111> 111.111] [1 + [] (11 ^ 1 <1) + (1> 1) = ([] + /-/[(!! /-/+/-/) [+ (111> 111)] + (!! [11] + []) [1 -~ 1] + (! [11] + {}) [1 | 1 <1 | 1] + (!! {} + []) [11% 11]) [111.111> 111.111]), 11 + 1> 1)] (~ 1 -~ 1e1 <1 <1) + "." + (+ [[] + ([] + 1) + (1 -~ 1 <1) + (1 + 1 <1) + (1 | 1 <1) + (1 <1 <1 <1)]) [[(!! 1 + {})[! 1 &. 1] + [[] + {} + [] [1 & [] [1 + [] + ([11/[] + {}] [+ (111> 111)] [([{}] + [{}]) [1e1> 1] + [[], [] + {}] [[] + 1] [+ !! 1] + (/^/[111] +/&/) [1 & 1] + [{}, 1e1 ,! 1 + [] [1 <1] [1 ^ 1 <1] + (111 /! {} +/1 /)[~ 1 + 1e1 + ~ 1] + [!! /-/+ [] [11> 11] [1 | 1] + ([] [1] + /&/) [1.1> 1.1] + [{}, [{}] + {}, 1] [~~ 1] [1 + 1e1 + 1] + ([] + !! 1) [1 ^ 1] + ([] + {}) [1 & 1] + [!! 1 + {}] [! 1 &. 1] [1 | [] + []) [([] +! 1) [1 | 1 <1 | 1] + [/= /, [] +/^/[11] [111% 11] [11.11> 11.11] + ([{}] + [{}]) [~~ (1.1 + 1.1)] + [1, [] +! /~ /] [1 | 1> 1 | 1] [1 ^ 1 <1] + ([] + 11/[]) [11 + 1> 1] + [!! /-/+ {}] [+ (1 <1)] [~~ 1] (1e1-1) + (+ []) = ([] + /-/[(!! 1 + []) [! 1 &. 1] + (!! /-/+/-/) [1 | 1 <1 | 1] + (! 1 + {}) [1 <1 ^ 1] + (!! [1] +/-/) [11> 11]) [111 ^ 111]),-~ 11> 1)] (~ 1 -~ 1e1 <1 <1)

(+ [[] + (1 <1 <1 <1) + (1 ^ 1 <1) + (1 <1> 1) + (-~ 1 <1 <1) + (1.1> 1.1) + (11> 1)]) [[(! /-/+ {}) [111 ^ 111] + [[] + {}] [! 1 &. 1] [1 | 1> 1 | 1] + ([111/[] + [] [+ (1> 1)] [([] + {}) [11-1> 1] + [[], [] + {} + [] [[] + 1] [1] + (/^/[1] + []) [1 | 1> 1 | 1] + [{}, 1e1 ,! {} + [] [1 + 1] [1 <1 ^ 1] + (11 /! {}+ {})[~ 1 + 1e1 + ~ 1] + [!! {} + {}] [[[] & 111] [1 & 1] + (/^/[111] + []) [11 ^ 11] + [{}, [{}] + {}, 1] [1 + [] [11 -~ 1 + 11> 1] + (!! 1 + {}) [1 & 1> 1] + ([] + {1:1} + []) [1 | 1] + [[] + !! 1] [111> 111] [1 <1> 1] + []) [([] +! [2, 111]) [1 | 1 <1 | 1] + [/= /, [] + [] [11] [1 | [] [1> 1] + ([{}] + {}) [1 + !! [1] + [1 ,! 1 + /~ /] [1% 11] [1 ^ 1 <1] + (111/[] + {})[~ 1 + 1e1 + ~ 1] + [!! /-/+/-/] [111% 111] [+ !! 1] (~ 1 + 1e1 + 1) + ((! 1 &. 1) = ([] + /-/[(!! [111] + {}) [1 ^ 1] + (!! [1] + []) [1 <1 ^ 1] + (! {} + {}) [1 ^ 1 <1] + (!! [1] +/-/) [+ (1> 1)]) [+ (1> 1)]), 1 -~ 1 <1)] (~ 1 -~ 1e1 <1 <1) + ":" + ([] = []) + /-/) [5] + ([] = []) +/-/) [5] + (+ [] + (1e1> 1) + (~ 1 + 1e1 + ~ 1) + (! 1 &. 1) + (111% 11) + (1 + 1 <1) + (1 <1 ^ 11> 1) + (1 <1 <1) + (~ 1 + 1e1 + 1) + (1> 1) + (+ []) + (~ 1-1 + 11) + (-~ 1 <1 <1) + (1 -~ 1 <1) + (~ 1 + 1e1)]) [[(! /-/+ []) [11 & [] + [[] + {11: 11} + [] [111> 111] [1 + [] + ([11 /! 1 +/1/] [1 & 1> 1] [([{}] + {}) [1e1> 1 | 1] + [[], [] + {11:111} + [] [1 | 1] [111% 11] + ([] + [] [11]) [1 <1> 1] + [{}, 1e1 ,! /~ /+ {}] [1 <1 ^ 1> 1] [1 <1 ^ 1] + ([] + 11 /! {})[~ 1 + 1e1 + ~ 1] + [!! [1, 111] + [] [1% 1] [1 & 1] + ([] + [] [111]) [. 1 ^! 1] + [{}, [] + {}, 1] [111% 11] [11 -~ 1 + 11> 1] + ([] + !! 1) [111> 111] + ([] + {} + []) [[] + 1] + [!! 1 + [] [1 ^ 1] [111% 11] + []) [(! 1 + {}) [1 ^ 1 <1] + [/= /, [] +/^/[11] [1 | [] [11.11> 11.11] + ([] + {} + []) [~~ (1.1 + 1.1)] + [1 ,! {} + /~ /] [1] [1 | 1 <1] + (1 /! {} + []) [~ 1 + 1e1 + ~ 1] + [!! [1] + {}] [111.111> 111.111] [1 + [] (11 ^ 1 <1) + (1> 1) = ([] + /-/[(!! /-/+/-/) [+ (111> 111)] + (!! [11] + []) [1 -~ 1] + (! [11] + {}) [1 | 1 <1 | 1] + (!! {} + []) [11% 11]) [111.111> 111.111]), 11 + 1> 1)] (~ 1 -~ 1e1 <1 <1) + "." + (+ [[] + ([] + 1) + (1 -~ 1 <1) + (1 + 1 <1) + (1 | 1 <1) + (1 <1 <1 <1)]) [[(!! 1 + {})[! 1 &. 1] + [[] + {} + [] [1 & [] [1 + [] + ([11/[] + {}] [+ (111> 111)] [([{}] + [{}]) [1e1> 1] + [[], [] + {}] [[] + 1] [+ !! 1] + (/^/[111] +/&/) [1 & 1] + [{}, 1e1 ,! 1 + [] [1 <1] [1 ^ 1 <1] + (111 /! {} +/1 /)[~ 1 + 1e1 + ~ 1] + [!! /-/+ [] [11> 11] [1 | 1] + ([] [1] + /&/) [1.1> 1.1] + [{}, [{}] + {}, 1] [~~ 1] [1 + 1e1 + 1] + ([] + !! 1) [1 ^ 1] + ([] + {}) [1 & 1] + [!! 1 + {}] [! 1 &. 1] [1 | [] + []) [([] +! 1) [1 | 1 <1 | 1] + [/= /, [] +/^/[11] [111% 11] [11.11> 11.11] + ([{}] + [{}]) [~~ (1.1 + 1.1)] + [1, [] +! /~ /] [1 | 1> 1 | 1] [1 ^ 1 <1] + ([] + 11/[]) [11 + 1> 1] + [!! /-/+ {}] [+ (1 <1)] [~~ 1] (1e1-1) + (+ []) = ([] + /-/[(!! 1 + []) [! 1 &. 1] + (!! /-/+/-/) [1 | 1 <1 | 1] + (! 1 + {}) [1 <1 ^ 1] + (!! [1] +/-/) [11> 11]) [111 ^ 111]),-~ 11> 1)] (~ 1 -~ 1e1 <1 <1)


How to implement it?
@ OKter: it is an ASCII code concatenation. Is it true?

Step 1
Let's take justjavac as an example. First, we need to output j.

The following code output j:

(1 + {}) [4]
Explanation: the result of code 1 + {} is "1 [object
Object] ", obviously, we get a string containing j. But why is it so strange? After all, we all expect the result of 1 + {} to be 1.

Object Addition
There is an addition operation as follows.

Value1 + value2
When calculating this expression, the internal operation steps are as follows (§ 11. 6.1 ):

Convert two operands to the original values (the pseudo code in mathematical notation is below, not JavaScript code that can be run ):

Prim1: = ToPrimitive (value1)
Prim2: = ToPrimitive (value2)
PreferredType is omitted, so the value of Date type adopts String, and the value of other types adopts Number.

If any one of prim1 or prim2 is a string, the other is also converted to a string and the result of the two String concatenation operations is returned.

Otherwise, convert both prim1 and prim2 to the numeric type and return their sum.

For more details, see

In JavaScript, how much is {} + {} equal?
 

Since the string can be used as an array to get the elements in it, (1 + {}) [4] gets j.

Step 2
Now that we get j, the next step is u. Based on this idea, which string contains u? There is indeed a special value in javascript that contains u: "undefined". You can use this code:

/1/[1] + []
Separate explanation:

/1/is an in-process expression

When he followed [], he was forcibly converted into an array and then retrieved from the element (the second element). The result is undefined (Note: it is an undefined value, not a string)

Convert undefined to a string. Here we add it to the array.

Haha, the above expression/1/is a bit confusing. In fact, 1 [1] is enough. In order to have a more geek sense, more 0 and 1 can appear. The "undefined1" string can be obtained through/1 +/[+ 0] + [+ 1 ".

Use the array operator to extract the desired u (/1 +/[+ 0] + [+ 1]) [0].

Now we have obtained the string "ju. In this way, we can get other strings. Nothing can be done, just unexpected.

The problem arises.
Can all characters be spelled out in this way? @ Long night raised a deeper question: "Can I spell Chinese ?"

@ TODO To be continued ......

Success
When we get all the strings, we can use the + sign to connect them. Do you think this is over? Of course, there is no such thing. We should make our code more Cool and geek.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.