picoctf/web/bookmarklet/solve.js

13 lines
385 B
JavaScript
Executable File

#!/usr/bin/env nix-shell
/*
#!nix-shell -i node -p nodejs
*/
var encryptedFlag = "àÒÆަȬë٣֖ÓÚåÛÑ¢ÕӜÒËɧœ©™í";
var key = "picoctf";
var decryptedFlag = "";
for (var i = 0; i < encryptedFlag.length; i++) {
decryptedFlag += String.fromCharCode((encryptedFlag.charCodeAt(i) - key.charCodeAt(i % key.length) + 256) % 256);
}
console.log(decryptedFlag)