mirror of
https://github.com/vee1e/Write-ups.git
synced 2026-09-01 11:08:39 +00:00
commit
92b6cedbb4
1 changed files with 205 additions and 0 deletions
205
misc/ictf_pass_js.js
Normal file
205
misc/ictf_pass_js.js
Normal file
|
|
@ -0,0 +1,205 @@
|
|||
'use strict';
|
||||
/** @type {!Array} */
|
||||
var big_list_on_top = ["1298NDJRuz", "1SokIrZ", "3|2|0|1|4", "38287luFSSX", "1BzNCnP", "6QMMLQT", "25819YnJJGc", "4787emtElt", "617341vNAjbx", "336893pLjMBx", "length", "217211OwWaGK", "285074XtEPmN", "Congrats!!!", "2HTpUWa", "139131prVwvx", "1ljELRv", "ZYPH3NAFUR1GT_BMKLE.0", "1134871bVGxkD", "2341YnJcxT", "shift", "166LKtHQY", "1rfcdzr", "383EzPWPw", "5387XbxlER", "363969HwSspE", "459706OQwMUO", "310Hdglyj", "572914UjDprZ", "700oyDWTZ", "log", "441046KVrdPb", "floor", "6867bAuRrU", "35906arOExL", "48937bEJivW",
|
||||
"983121vgeeVc", "330Jeyjbe", "2ZhzQhZ", "4783CTkolx", "41RPXVyE", "test", "18igQKSS", "498549IhYbqD"];
|
||||
/** @type {function(number, ?): ?} */
|
||||
var ref_to_big_list_function = big_list_function;
|
||||
(function(data, oldPassword) {
|
||||
/** @type {function(number, ?): ?} */
|
||||
var toMonths = big_list_function;
|
||||
for (; !![];) {
|
||||
try {
|
||||
/** @type {number} */
|
||||
var userPsd = -parseInt(toMonths(185)) * parseInt(toMonths(208)) + -parseInt(toMonths(189)) * parseInt(toMonths(187)) + parseInt(toMonths(174)) * -parseInt(toMonths(215)) + -parseInt(toMonths(186)) + parseInt(toMonths(213)) + -parseInt(toMonths(191)) + parseInt(toMonths(211)) * parseInt(toMonths(183));
|
||||
if (userPsd === oldPassword) {
|
||||
break;
|
||||
} else {
|
||||
data["push"](data["shift"]());
|
||||
}
|
||||
} catch (ex) {
|
||||
data["push"](data["shift"]());
|
||||
}
|
||||
}
|
||||
})(big_list_on_top, 254171);
|
||||
/** @type {!Array} */
|
||||
var another_big_list = ["split", ref_to_big_list_function(180), ref_to_big_list_function(214), "153MASPMI", "42DPIOhl", ref_to_big_list_function(196), "20VbTLqJ", ref_to_big_list_function(202), ref_to_big_list_function(212), ref_to_big_list_function(190), "498640Wruoqe", ref_to_big_list_function(177), "push", ref_to_big_list_function(194), ref_to_big_list_function(203), ref_to_big_list_function(209), ref_to_big_list_function(201), ref_to_big_list_function(178), ref_to_big_list_function(188), ref_to_big_list_function(193), ref_to_big_list_function(195), ref_to_big_list_function(198), ref_to_big_list_function(207), ref_to_big_list_function(173), ref_to_big_list_function(199), ref_to_big_list_function(175), ref_to_big_list_function(192), ref_to_big_list_function(182), "178658HlLtWE", ref_to_big_list_function(216), "656587FXzDeH", ref_to_big_list_function(176),
|
||||
"charCodeAt", ref_to_big_list_function(200), ref_to_big_list_function(205), ref_to_big_list_function(184), "13681DjwrHy", ref_to_big_list_function(179), ref_to_big_list_function(210), ref_to_big_list_function(204), ref_to_big_list_function(197), ref_to_big_list_function(181), "240929VwwlKp", ref_to_big_list_function(206), "|", "0", "1", "2", "3", "4"];
|
||||
/** @type {!Array} */
|
||||
var yet_another_big_list = [another_big_list[0], another_big_list[1], another_big_list[2], another_big_list[3], another_big_list[4], another_big_list[5], another_big_list[6], another_big_list[7], another_big_list[8], another_big_list[9], another_big_list[10], another_big_list[11], another_big_list[12], another_big_list[13], another_big_list[14], another_big_list[15], another_big_list[16], another_big_list[17], another_big_list[18], another_big_list[19], another_big_list[20], another_big_list[21], another_big_list[22], another_big_list[23], another_big_list[24], another_big_list[25], another_big_list[26], another_big_list[27], another_big_list[28], another_big_list[29], another_big_list[30], another_big_list[31], another_big_list[32], another_big_list[33], another_big_list[34], another_big_list[35], another_big_list[36], another_big_list[37]];
|
||||
/**
|
||||
* @param {number} totalExpectedResults
|
||||
* @param {?} entrySelector
|
||||
* @return {?}
|
||||
*/
|
||||
function yet_another_big_list_function(totalExpectedResults, entrySelector) { // big_list func
|
||||
return yet_another_big_list_function = function(hashOrKey, value) {
|
||||
/** @type {number} */
|
||||
hashOrKey = hashOrKey - 428;
|
||||
var _0x3c91a9 = yet_another_big_list[hashOrKey];
|
||||
return _0x3c91a9;
|
||||
}, yet_another_big_list_function(totalExpectedResults, entrySelector);
|
||||
}
|
||||
/**
|
||||
* @param {number} totalExpectedResults
|
||||
* @param {?} entrySelector
|
||||
* @return {?}
|
||||
*/
|
||||
function big_list_function(totalExpectedResults, entrySelector) { // returns element from big list
|
||||
return big_list_function = function(hashOrKey, value) {
|
||||
/** @type {number} */
|
||||
hashOrKey = hashOrKey - 173;
|
||||
var big_list_minus_173 = big_list_on_top[hashOrKey];
|
||||
return big_list_minus_173;
|
||||
}, big_list_function(totalExpectedResults, entrySelector);
|
||||
}
|
||||
/** @type {function(number, ?): ?} */
|
||||
var ref_yet_another_big_list_function = yet_another_big_list_function;
|
||||
(function(canCreateDiscussions, data) {
|
||||
/** @type {function(number, ?): ?} */
|
||||
var toMonths = yet_another_big_list_function;
|
||||
for (; !![];) {
|
||||
try {
|
||||
/** @type {number} */
|
||||
var lastScriptData = parseInt(toMonths(459)) + -parseInt(toMonths(457)) * parseInt(toMonths(428)) + parseInt(toMonths(430)) + parseInt(toMonths(447)) + -parseInt(toMonths(445)) * parseInt(toMonths(437)) + -parseInt(toMonths(458)) * parseInt(toMonths(443)) + parseInt(toMonths(453));
|
||||
if (lastScriptData === data) {
|
||||
break;
|
||||
} else {
|
||||
canCreateDiscussions[another_big_list[12]](canCreateDiscussions[another_big_list[1]]());
|
||||
}
|
||||
} catch (exc) {
|
||||
canCreateDiscussions[another_big_list[12]](canCreateDiscussions[another_big_list[1]]());
|
||||
}
|
||||
}
|
||||
})(yet_another_big_list, 314953);
|
||||
/** @type {!Array} */
|
||||
var list_4 = [ref_yet_another_big_list_function(433), ref_yet_another_big_list_function(435), ref_yet_another_big_list_function(448), another_big_list[38], ref_yet_another_big_list_function(438), ref_yet_another_big_list_function(441), another_big_list[39], ref_yet_another_big_list_function(462), ref_yet_another_big_list_function(451), ref_yet_another_big_list_function(444), ref_yet_another_big_list_function(440), ref_yet_another_big_list_function(449), ref_yet_another_big_list_function(464), another_big_list[40], ref_yet_another_big_list_function(461), ref_yet_another_big_list_function(463), ref_yet_another_big_list_function(454), ref_yet_another_big_list_function(465), ref_yet_another_big_list_function(434), ref_yet_another_big_list_function(452), ref_yet_another_big_list_function(455), another_big_list[41], ref_yet_another_big_list_function(436), ref_yet_another_big_list_function(450), ref_yet_another_big_list_function(429), another_big_list[42], another_big_list[43], ref_yet_another_big_list_function(432), ref_yet_another_big_list_function(460), ref_yet_another_big_list_function(446), ref_yet_another_big_list_function(431), ref_yet_another_big_list_function(439)];
|
||||
/** @type {function(number, ?): ?} */
|
||||
var ref_list_4_function = list_4_function;
|
||||
(function(myPreferences, data) {
|
||||
var getPreferenceKey = ref_yet_another_big_list_function;
|
||||
/** @type {function(number, ?): ?} */
|
||||
var toMonths = list_4_function;
|
||||
for (; !![];) {
|
||||
try {
|
||||
/** @type {number} */
|
||||
var lastScriptData = -parseInt(toMonths(433)) * parseInt(toMonths(440)) + parseInt(toMonths(409)) * -parseInt(toMonths(411)) + -parseInt(toMonths(419)) + -parseInt(toMonths(425)) * -parseInt(toMonths(428)) + parseInt(toMonths(414)) * -parseInt(toMonths(423)) + parseInt(toMonths(417)) * parseInt(toMonths(424)) + parseInt(toMonths(438));
|
||||
if (lastScriptData === data) {
|
||||
break;
|
||||
} else {
|
||||
myPreferences[getPreferenceKey(451)](myPreferences[getPreferenceKey(440)]());
|
||||
}
|
||||
} catch (_0x27106b) {
|
||||
myPreferences[getPreferenceKey(451)](myPreferences[getPreferenceKey(440)]());
|
||||
}
|
||||
}
|
||||
})(list_4, 343661);
|
||||
/**
|
||||
* @param {number} totalExpectedResults
|
||||
* @param {?} entrySelector
|
||||
* @return {?}
|
||||
*/
|
||||
function list_4_function(totalExpectedResults, entrySelector) { //big_list_4 func
|
||||
return list_4_function = function(hashOrKey, value) {
|
||||
/** @type {number} */
|
||||
hashOrKey = hashOrKey - 409;
|
||||
var _0x239ef8 = list_4[hashOrKey];
|
||||
return _0x239ef8;
|
||||
}, list_4_function(totalExpectedResults, entrySelector);
|
||||
}
|
||||
/** @type {!Array} */
|
||||
var list_5 = [ref_list_4_function(436), ref_list_4_function(434), ref_yet_another_big_list_function(456), ref_list_4_function(431), ref_list_4_function(420), ref_list_4_function(412), ref_list_4_function(426), ref_list_4_function(413), ref_list_4_function(427), ref_yet_another_big_list_function(442), ref_list_4_function(439), ref_list_4_function(418), ref_list_4_function(410), ref_list_4_function(416), ref_list_4_function(430), ref_list_4_function(422), ref_list_4_function(429)];
|
||||
/**
|
||||
* @param {number} totalExpectedResults
|
||||
* @param {?} entrySelector
|
||||
* @return {?}
|
||||
*/
|
||||
function list_5_function(totalExpectedResults, entrySelector) {
|
||||
return list_5_function = function(hashOrKey, value) {
|
||||
/** @type {number} */
|
||||
hashOrKey = hashOrKey - 191;
|
||||
var _0x5ce25c = list_5[hashOrKey];
|
||||
return _0x5ce25c;
|
||||
}, list_5_function(totalExpectedResults, entrySelector);
|
||||
}
|
||||
(function(nodes, data) {
|
||||
var getIndexForNode = ref_yet_another_big_list_function;
|
||||
var findMiddlePosition = ref_list_4_function;
|
||||
/** @type {function(number, ?): ?} */
|
||||
var toMonths = list_5_function;
|
||||
for (; !![];) {
|
||||
try {
|
||||
/** @type {number} */
|
||||
var lastScriptData = -parseInt(toMonths(204)) * -parseInt(toMonths(202)) + -parseInt(toMonths(201)) * parseInt(toMonths(194)) + parseInt(toMonths(200)) * parseInt(toMonths(207)) + parseInt(toMonths(197)) + parseInt(toMonths(206)) + -parseInt(toMonths(196)) * parseInt(toMonths(199)) + -parseInt(toMonths(191));
|
||||
if (lastScriptData === data) {
|
||||
break;
|
||||
} else {
|
||||
nodes[findMiddlePosition(435)](nodes[findMiddlePosition(437)]());
|
||||
}
|
||||
} catch (_0x2a8de1) {
|
||||
nodes[findMiddlePosition(435)](nodes[getIndexForNode(440)]());
|
||||
}
|
||||
}
|
||||
})(list_5, 614422);
|
||||
/**
|
||||
* @param {?} constraints
|
||||
* @return {undefined}
|
||||
*/
|
||||
function boop(constraints) {
|
||||
var equal = ref_yet_another_big_list_function;
|
||||
var getCurrentEndpoint = ref_list_4_function;
|
||||
/** @type {function(number, ?): ?} */
|
||||
var getSessionEndpointKey = list_5_function;
|
||||
var callbackVals = getCurrentEndpoint(421)[getSessionEndpointKey(193)](another_big_list[44]);
|
||||
/** @type {number} */
|
||||
var callbackCount = 0;
|
||||
for (; !![];) {
|
||||
switch(callbackVals[callbackCount++]) {
|
||||
case 0:
|
||||
/** @type {number} */
|
||||
var previousState = 0;
|
||||
continue;
|
||||
case 1:
|
||||
/** @type {number} */
|
||||
var value = 0;
|
||||
for (; value < constraints.length; value++) {
|
||||
pre = pre + constraints.charCodeAt(value); //sum of all ascii of input
|
||||
/** @type {number} */
|
||||
b = b ^ constraints.charCodeAt(value); //xor of ascii of input
|
||||
previousState = (previousState << 5) - previousState + constraints.charCodeAt(value); //some weird bitshift
|
||||
}
|
||||
continue;
|
||||
case 2:
|
||||
/** @type {number} */
|
||||
var b = 0;
|
||||
continue;
|
||||
case 3:
|
||||
/** @type {number} */
|
||||
var pre = 0;
|
||||
continue;
|
||||
case 4:
|
||||
console.log(pre, b, previousState);
|
||||
if (!/[^ZYPH3NAFUR1GT_BMKLE.0]/.test(constraints)
|
||||
&& pre == 2024
|
||||
&& b == 126
|
||||
&& previousState == -685590366
|
||||
&& constraints.charCodeAt(0) - constraints.charCodeAt(1) == 1 //consec chars
|
||||
&& Math.floor(constraints.charCodeAt(1) * constraints.charCodeAt(2) * constraints.charCodeAt(3) / 1846) == 277
|
||||
&& constraints.charCodeAt(4) + constraints.charCodeAt(5) - constraints.charCodeAt(6) +
|
||||
constraints.charCodeAt(7) == 114
|
||||
&& Math.floor(constraints.charCodeAt(8) * constraints.charCodeAt(9) / constraints.charCodeAt(10) * constraints.charCodeAt(11)) == 3249
|
||||
&& Math.floor(constraints.charCodeAt(13) / constraints.charCodeAt(12) / constraints.charCodeAt(14) * constraints.charCodeAt(15)) == 1
|
||||
&& (constraints.charCodeAt(16)
|
||||
&& constraints.charCodeAt(18) == "ZYPH3NAFUR1GT_BMKLE.0".length << 2)
|
||||
&& constraints.charCodeAt(6) == constraints.charCodeAt(17)
|
||||
&& Math.floor(constraints.charCodeAt(19) * constraints.charCodeAt(20) / constraints.charCodeAt(21)) == 46
|
||||
&& constraints.charCodeAt(22) + constraints.charCodeAt(23) - constraints.charCodeAt(24) ==
|
||||
116
|
||||
&& constraints.charCodeAt(25) + constraints.charCodeAt(26) + constraints.charCodeAt(27) == 138) {
|
||||
alert("Congrats!!!");
|
||||
}
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
;
|
||||
Loading…
Add table
Add a link
Reference in a new issue