Created
September 23, 2018 13:02
-
-
Save Ge0rg3/e00afd1c326b25cbb53a4f49ae718f61 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/sha256.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/aes.js"></script> | |
<script> | |
function hex2a(hex) { | |
var str = ''; | |
for (var i = 0; i < hex.length; i += 2) | |
str += String.fromCharCode(parseInt(hex.substr(i, 2), 16)); | |
return str; | |
} | |
for (var i=0; i < 256;i++) { | |
var data = "PKhuCrfh3RUw4vie3OMa8z4kcww1i7198ly0Q4rpuyA="; | |
var k = CryptoJS.SHA256("\x93\x39\x02\x49\x83\x02\x82\xf3\x23\xf8\xd3\x13"+String.fromCharCode(i)); | |
var key = k.toString().substr(0,32); | |
var iv = k.toString().substr(32,64); | |
var plaintextArray = CryptoJS.AES.decrypt( | |
{ | |
ciphertext: CryptoJS.enc.Base64.parse(data), | |
salt: "" | |
}, | |
CryptoJS.enc.Hex.parse(key), | |
{ iv: CryptoJS.enc.Hex.parse(iv) } | |
); | |
var result = hex2a(plaintextArray.toString()); | |
if (result.includes("FLG")) { | |
console.log("Result found!\n"+result); | |
break | |
} else { | |
console.log(result); | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment