Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<? const $ = q => document.querySelector(q); const $a = q => document.querySelectorAll(..
Decoded Output download
<? const $ = q => document.querySelector(q);
const $a = q => document.querySelectorAll(q);
const boxes = $a('.box');
let flagbox = boxes[Math.floor(Math.random() * boxes.length)];
for (const box of boxes) {
if (box === flagbox) {
box.onclick = () => {
let enc = `"V=U= =R= SS"`;
for (let i = 0; i < enc.length; ++i) {
try {
enc = JSON.parse(enc);
} catch (e) { }
}
let rw = [];
for (const e of enc) {
rw['push'](e['charCodeAt'](0) ^ 0x62);
}
const x = rw['map'](x => String['fromCharCode'](x));
alert(`Congrats ${x['join']('')}`);
};
flagbox = null;
} else {
box.onclick = () => alert('no flag here');
}
}; ?>
Did this file decode correctly?
Original Code
<? const $ = q => document.querySelector(q);
const $a = q => document.querySelectorAll(q);
const boxes = $a('.box');
let flagbox = boxes[Math.floor(Math.random() * boxes.length)];
for (const box of boxes) {
if (box === flagbox) {
box.onclick = () => {
let enc = `"\u000e\u0003\u0001\u0016\u0004\u0019\u0015V\u0011=\u000bU=\u000e\u0017\u0001\t=R\u0010=\u0011\t\u000bSS\u001f"`;
for (let i = 0; i < enc.length; ++i) {
try {
enc = JSON.parse(enc);
} catch (e) { }
}
let rw = [];
for (const e of enc) {
rw['push'](e['charCodeAt'](0) ^ 0x62);
}
const x = rw['map'](x => String['fromCharCode'](x));
alert(`Congrats ${x['join']('')}`);
};
flagbox = null;
} else {
box.onclick = () => alert('no flag here');
}
}; ?>
Function Calls
None |
Stats
MD5 | ac566b412b8df1ac6ff7ff18a0b4e074 |
Eval Count | 0 |
Decode Time | 71 ms |