Skip to content

Instantly share code, notes, and snippets.

@Zibri
Last active July 3, 2018 07:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Zibri/c040a013548f3f5039fa75cafb98d9a8 to your computer and use it in GitHub Desktop.
Save Zibri/c040a013548f3f5039fa75cafb98d9a8 to your computer and use it in GitHub Desktop.
OpenRG Deobfuscator
<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>
@Zibri
Copy link
Author

Zibri commented Jul 3, 2018

RUN

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment