Last active
December 23, 2018 11:24
-
-
Save JavaScript-Packer/d82363449e055a5f0507 to your computer and use it in GitHub Desktop.
Turned/reversed the unpacker for WHAK compression algorithm and made it into a HTML entities encoder - http://www.whak.ca/packer/JavaScript.htm
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
var W,H,A,K; | |
H ="& < > " '"[$="split"](" "); | |
A ="&<>\"\n'";W='<script>alert("www.WHAK.com");<\/script>'; | |
K =0;for(K in A)W=W[$](A[K]).join(H[K]);alert(W); |
Author
JavaScript-Packer
commented
Jul 26, 2015
Here is is as a functional function...
function HTML( W,H,A,K ){
H = '& < > " ''.split(' ');
A = '&<>"\x0A\''.split('');
K = 0; for(K in A)W=W.split(A[K]).join(H[K]);return W
}alert(HTML('<script>alert("www.WHAK.com");<\/script>'));
Minified
function HTM(W,H,A,K){H="& < > " '"[x='split'](" ");A="&<>\"\n'"[x]("");K=0;for(K in A)W=W[x](A[K]).join(H[K]);return W}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment