Last active
February 8, 2019 23:08
-
-
Save matthewarkin/ff8aa8b183568e2c050269aea832a7ea to your computer and use it in GitHub Desktop.
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
<body> | |
<a href="javascript:function base64toHEX(base64){var raw=atob(base64);var HEX='';for(i=0;i<raw.length;i++){var _hex=raw.charCodeAt(i).toString(16)var current=raw.charCodeAt(i)HEX+=raw.charCodeAt(i)<32||raw.charCodeAt(i)>126?"\\x"+(_hex.length==2?_hex:'0'+_hex).toUpperCase():raw[i]}var tagsToReplace={'<':'<','>':'>'};function replaceTag(tag){return tagsToReplace[tag]||tag}return HEX.replace(/[<>]/g,replaceTag)}regex=/decode64\(\"(.*?)\"\)/g output=[]while(matches=regex.exec(document.body.innerHTML)){document.getElementById('search-query-messages-table').innerHTML=document.getElementById('search-query-messages-table').innerHTML.replace(matches[0],base64toHEX(matches[1]))}">Decode PRLE"</a> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
{var raw=atob(base64);var HEX='';for(i=0;i<raw.length;i++){var _hex=raw.charCodeAt(i).toString(16)var current=raw.charCodeAt(i)HEX+=raw.charCodeAt(i)<32||raw.charCodeAt(i)>126?"\x"+(_hex.length==2?_hex:'0'+_hex).toUpperCase():raw[i]}var tagsToReplace={'<':'<','>':'>'};function replaceTag(tag){return tagsToReplace[tag]||tag}return HEX.replace(/[<>]/g,replaceTag)}regex=/decode64\("(.*?)"\)/g output=[]while(matches=regex.exec(document.body.innerHTML)){document.getElementById('search-query-messages-table').innerHTML=document.getElementById('search-query-messages-table').innerHTML.replace(matches[0],base64toHEX(matches[1]))})