Last active
July 3, 2018 07:04
-
-
Save Zibri/c040a013548f3f5039fa75cafb98d9a8 to your computer and use it in GitHub Desktop.
OpenRG Deobfuscator
This file contains 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
<html> | |
<head> | |
<script type="text/javascript"> | |
if (document.images) { | |
img1 = new Image(); | |
img1.src = "https://gist.github.com/Zibri/c040a013548f3f5039fa75cafb98d9a8/raw/374b3ba2ca881eb0a39958dd724765eefd0703fe/gatto1.jpg"; | |
img2 = new Image(); | |
img2.src = "https://gist.github.com/Zibri/c040a013548f3f5039fa75cafb98d9a8/raw/374b3ba2ca881eb0a39958dd724765eefd0703fe/gatto2.jpg"; | |
} | |
</script> | |
</head> | |
<title> OpenRG Deobfuscator by Zibri. http://www.zibri.org</title> | |
<body style="background-color:transparent;" allowTransparency="true"> | |
<center><a href=http://www.zibri.org><img id=gatto name=gatto src="https://gist.github.com/Zibri/c040a013548f3f5039fa75cafb98d9a8/raw/374b3ba2ca881eb0a39958dd724765eefd0703fe/gatto2.jpg"></img></a></center><br/> | |
<center><input type=text id=enc name=enc value="" style="width:75%" autocomplete=off /><br/><input type=button id=butt value="Deobfuscate" onClick="doit()" /></center> | |
<script> | |
function deobfuscate(enc) { | |
var key = [86, -12, -17, 80, 52, 169, -17, 107, 85, 75, 3, 60, 154, 1, 120, 179, -3, 177, 61, 211, 155, 210, 203, 159, 6, 209, 209, 101, -24, 189, 45, 159, 177, -17, 141,216, -12, -4, 187, 195, 184, 161, 11, 174, 61, 193, 46, 174, -29, 84, 7, -15, 10, 90, 208, 138, 120, 4, 6, 50, 134, 44, 172, -14]; | |
var code = 0; | |
var dec = ""; | |
var z = 0; | |
for (var i = 0; i < enc.length; i++) { | |
if (enc.charCodeAt(i) != 38) { | |
code = enc.charCodeAt(i); | |
} else { | |
i++; | |
var zib = ("0x" + enc.charAt(i++) + enc.charAt(i++)); | |
code = parseInt(zib, 16); | |
} | |
zib = code - key[z]; | |
if (zib < 0) zib = zib + 255; | |
dec = dec + String.fromCharCode(zib); | |
z++; | |
} | |
return dec; | |
} | |
function doit() { | |
if (document.getElementById("butt").value == "Clear") { | |
document.getElementById("butt").value = "Deobfuscate"; | |
document.getElementById("enc").value = ""; | |
document.getElementById("gatto").src = "https://gist.github.com/Zibri/c040a013548f3f5039fa75cafb98d9a8/raw/374b3ba2ca881eb0a39958dd724765eefd0703fe/gatto2.jpg"; | |
} else { | |
if (document.getElementById("butt").value == "Deobfuscate") { | |
var zib = deobfuscate(document.getElementById("enc").value); | |
document.getElementById("enc").value = zib; | |
document.getElementById("butt").value = "Copy to clipboard (IE7) / Select"; | |
document.getElementById("gatto").src = "https://gist.github.com/Zibri/c040a013548f3f5039fa75cafb98d9a8/raw/374b3ba2ca881eb0a39958dd724765eefd0703fe/gatto1.jpg"; | |
} else { | |
if (document.getElementById("butt").value == "Copy to clipboard (IE7) / Select") { | |
if (window.clipboardData && clipboardData.setData) { | |
clipboardData.setData("Text", document.getElementById("enc").value); | |
alert('Deobfuscated text is now in your clipboard!'); | |
document.getElementById("butt").value = "Deobfuscate"; | |
document.getElementById("enc").value = ""; | |
document.getElementById("gatto").src = "https://gist.github.com/Zibri/c040a013548f3f5039fa75cafb98d9a8/raw/374b3ba2ca881eb0a39958dd724765eefd0703fe/gatto2.jpg"; | |
} else { | |
document.getElementById("enc").focus(); | |
document.getElementById("enc").select(); | |
document.execCommand("Copy"); | |
alert('Deobfuscated text *should be* in your clipboard!'); | |
document.getElementById("butt").value = "Clear"; | |
} | |
} | |
} | |
} | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
RUN