JavaScript Obfuscated Numbering For CSRF

Posted at

+((!+[]+!![]+!![]+[])+(+!![]))                                           31
+((+!![]+[])+(!+[]+!![]))                                                12
+((+!![]+[])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![]+!![]))                  18
+((!+[]+!![]+!![]+!![]+[])+(+!![]))                                      41
+((!+[]+!![]+!![]+!![]+[])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![]))         47
!+[]+!![]+!![]+!![]+!![]+!![]+!![]                                        7
+((!+[]+!![]+!![]+[])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]))    39





and a part of the entire mechanism (including several DOM elements embedded in the HTML (no javascript) with hidden-input containing token and public encryption key(s):


(function () {
var a = function () {
try {
return !!window.addEventListener
} catch (e) {
return !1
}
}
, b = function (b, c) {
a() ? document.addEventListener("DOMContentLoaded", b, c) : document.attachEvent("onreadystatechange", b)
};
b(function () {
var a = document.getElementById('cf-content');
a.style.display = 'block';
setTimeout(function () {
var s, t, o, p, b, r, e, a, k, i, n, g, f, zMiHfRM = {
"v": +((!+[] + !![] + !![] + []) + (+!![]))
};
t = document.createElement('div');
t.innerHTML = "<a href='/'>x</a>";
t = t.firstChild.href;
r = t.match(/https?:\\/\\//)[0];
t = t.substr(r.length);
t = t.substr(0, t.length - 1);
a = document.getElementById('jschl-answer');
f = document.getElementById('challenge-form');
zMiHfRM.v *= +((+!![] + []) + (!+[] + !![]));
zMiHfRM.v *= +((+!![] + []) + (!+[] + !![] + !![] + !![] + !![] + !![] + !![] + !![]));
zMiHfRM.v *= +((!+[] + !![] + !![] + !![] + []) + (!+[] + !![] + !![] + !![] + !![] + !![] + !![]));
zMiHfRM.v += !+[] + !![] + !![] + !![] + !![] + !![] + !![];
zMiHfRM.v -= +((!+[] + !![] + !![] + []) + (!+[] + !![] + !![] + !![] + !![] + !![] + !![] + !![] + !![]));
zMiHfRM.v -= +((+!![] + []) + (!+[] + !![]));
zMiHfRM.v -= +((!+[] + !![] + !![] + !![] + []) + (+!![]));
a.value = parseInt(zMiHfRM.v, 10) + t.length;
'; 121'
f.submit();
}, 4000);
}, false);
}());