forked from chakra-core/ChakraCore
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwitheval.js
More file actions
32 lines (29 loc) · 963 Bytes
/
witheval.js
File metadata and controls
32 lines (29 loc) · 963 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
var x = { a: "x.a", f: function() { return this.a; } };
var y = { a: "y.a", f: function() { return this.a; } };
var a = "glo.a";
function f() {
return this.a;
}
with (x) {
with (y) {
eval("WScript.Echo(f())");
eval("WScript.Echo(x.f(), f())");
}
eval("WScript.Echo(x.f(), f())");
}
eval("WScript.Echo(y.f(), x.f(), f())");
with (Math) {
with (9) {
with (8) {
with (7) {
with (6) {
WScript.Echo(eval("abs(valueOf())"));
}
}
}
}
}