Good Authentication
Description
Analysis
Solution
password = "sontTbxTjffe";
const block = [
Array.from(password).slice(0, 4),
Array.from(password).slice(4, 8),
Array.from(password).slice(8, 12)
]
let crafted = "";
for (let i = 0; i < block.length; i++) {
for (let a = 0; a < block[i].length; a++) {
if (i == 0) {
crafted += String.fromCharCode(String(block[i][a]).charCodeAt(0) ^ 7)
} else if (i == 1) {
crafted += String.fromCharCode(String(block[i][a]).charCodeAt(0) ^ 11)
} else {
crafted += String.fromCharCode(String(block[i][a]).charCodeAt(0) ^ 9)
}
}
}
console.log(crafted)
>>> this_is_coolFlag
Last updated