-
-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathbreaker.js
More file actions
135 lines (116 loc) · 3.14 KB
/
breaker.js
File metadata and controls
135 lines (116 loc) · 3.14 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
// https://client-api.arkoselabs.com/dapib/eu-west-1/6cadf6b9-95fd-4fb0-8ba6-b960e56107c9/1847.js
(function () {
function sendResult(tanswer) {
console.log("Sending result:", tanswer);
window.parent.ae.dapibReceive({tanswer: tanswer});
}
function F(answers) {
let b = answers;
b = b.map((L) => {
const f = L;
Object.keys(L).forEach((h) => {
const m = L[h];
const w = m.split("");
f[h] = w.reverse().join("");
});
return f;
});
b = b.map((L) => {
const f = L;
Object.keys(L).forEach((h) => {
const m = L[h];
const w = m.split("");
f[h] = w.reverse().join("");
});
return f;
});
b = b.map((L) => {
const f = L;
Object.keys(L).forEach((h) => {
const w = L[h];
const O = w.split("");
const i = (P, E) => {
if (E.match(/[0-9]/)) {
return P + String.fromCharCode(+E + 33);
}
if (E.match(/[a-zA-Z]/)) {
const t = E.charCodeAt(0);
return P + t.toString();
}
return P + E;
};
f[h] = O.reduce(i, "");
});
return f;
});
b = b.map((L) => {
const f = L;
Object.keys(L).forEach((h) => {
const m = L[h];
let w = m.replace(/[^a-zA-Z0-9_$]/g, "");
if (!/^[a-zA-Z_$]/.test(w)) {
w = "_" + w;
}
f[w] = h;
});
return f;
});
return b;
}
function u(inputAnswer, L) {
// Unused
// const f = g(this, function () {
// return f.toString().search("(((.+)+)+)+$").toString().constructor(f).search("(((.+)+)+)+$");
// });
// f();
const h = inputAnswer.map((w) => {
const O = w;
Object.keys(w).forEach((i) => {
const S = w[i].toString();
O[i] = w[i].toString();
});
return O;
});
// let m = H.TBkgh(F, h);
let m = F(h);
m = m.map((answer) => {
const ianswer = answer;
Object.keys(answer).forEach((w) => {
let O = ianswer[w];
O = O + (L ? L : "");
ianswer[w] = O;
});
return ianswer;
});
return sendResult(m);
}
const g = (function () {
let b = true;
return function (L, f) {
const h = b
? function () {
if (f) {
const m = f.apply(L, arguments);
f = null;
return m;
}
}
: function () {};
b = false;
return h;
};
})();
try {
let x = undefined;
if (Object.prototype.toString.call(typeof process !== "undefined" ? process : 0) === "[object process]" || (window.document.hidden && window.document.visibilityState === "prerender" && typeof window.requestAnimationFrame === "undefined" && typeof window.cancelAnimationFrame === "undefined") || !(window.document.activeElement instanceof Object)) {
console.log("DOING WEIRD RANDOM (detected sandbox?)", [Object.prototype.toString.call(typeof process !== "undefined" ? process : 0) === "[object process]", window.document.hidden, window.document.visibilityState === "prerender", typeof window.requestAnimationFrame === "undefined", typeof window.cancelAnimationFrame === "undefined", !(window.document.activeElement instanceof Object)]);
x = String.fromCharCode(Math.random() * 26 + 65);
}
console.log("mess up?:", x);
const answer = window.parent.ae.answer;
u(answer, x);
} catch (err) {
console.error(err);
sendResult(err);
}
})();