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
var $='WHAK',w=document,h='getElementById',a="javascript",k="value",o="packer"; | |
w.writeln('<h4><a href="http://www.'+$+'.ca">JavaScript Source Code To Code Points Packer</a></h4>\ | |
<textarea id=javascript rows=6 cols=77 onmouseover=this.select()>alert("www.'+$+'.com");<\/textarea>\ | |
<br><textarea id=packer rows=6 cols=77 onmouseover=this.select()><\/textarea><br>\ | |
<input value="Pack" type=button onclick="w[h](o)[k]=Pack_JS_2_Codepoints(w[h](a)[k]);"> \ | |
<input value="Test" type=button onclick="eval(w[h](o)[k]);">'); | |
function Pack_JS_2_Codepoints(W,H,A,K){K=W.replace(/./g,function(H){ | |
return","+H.charCodeAt(0)});A="eval(String.fromCharCode("+K.replace(",","")+"));";return A} | |
w[h](o)[k]=Pack_JS_2_Codepoints(w[h](a)[k]); | |
//Try it on http://www.whak.ca/demo/codepoints-javascript-packer.htm |
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
In JavaScript, this will make an alert: | |
eval(unescape(btoa("jW«·ý¼ÿnÕÈÿm0Ãöy'+B¢jkzË?Ùç(ý»ÿoÝ¿öý").replace(/\57/g,"\45"))); | |
$DJ | |
If you encode the above with Base64 it will give you the word JERK | |
,åD | |
If you encode the above with Base64 it will give you the word LOVE |
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
//Another Twitter string compressor. In base 36 I found over 18,000 posible combinations of letters only. | |
//My name is Dave, there is character 㜊 (code 㜊) that looks like "ave" | |
//javascript:alert(parseInt('ave', 36)), so I can literally encode my name to 2 characters instead of 5. | |
document['wr'+'ite'](unescape("%3Ctextarea%20id=whak%20rows=%226%22%20cols=%2277%22%20onmouseover=%22this.select()%22%3EDave%20suggests%20that%20you%20visit%20www.ScriptCompress.com%20for%20many%20neat%20JavaScript%20programming%20tools!%3C%2Ftextarea%3E%3Cinput%20type=text%20id=%22szwhak%22%20size=%225%22%3E%3Cbr%3E%3Ctextarea%20id=%22pack%22%20rows=%226%22%20cols=%2277%22%20onmouseover=%22this.select()%22%3E%3C%2Ftextarea%3E%3Cinput%20type=text%20id=%22szpack%22%20size=%225%22%3E%3Cbr%3E%3Cinput%20type=%22button%22%20id=%22encoder%22%20onclick=%22encode(whak.value)%22%20value=%22Twit%20Compress%22%3E%3Cinput%20type=%22button%22%20id=%22decoder%22%20onclick=%22decode()%22%20value=%22Twit%20Decompress%22%3E")); | |
function disf |
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
function ascii2binary(e, joiner) { | |
return Array.prototype.map.call(e, function(e) { | |
var t = e.charCodeAt(0).toString(2); | |
return "00000000".substr(t.length) + t; | |
}).join(joiner); | |
} | |
function binary2ascii(e, joiner) { | |
if (!joiner)joiner=" "; //added so you can leave joiner blank e.g. joiner=""; | |
return e.replace(RegExp(joiner + "*[01]{8}" + joiner + "*", "g"), function(e) { | |
return String.fromCharCode(parseInt(e, 2)); |
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
// run length encoder/decoder, not useful when sequence has numbers already in it | |
function encode_rle(r) { | |
for (var o, i, n = 0, t = r.length, e = ""; t > n; ++n) void 0 !== o ? r[n] === o ? i++ :(e += i + o, | |
o = r[n], i = 1) :(o = r[n], i = 1); | |
return e + (i + o); | |
} | |
function decode_rle(r) { | |
var t, n = /^\d+/.exec(r); | |
return null === n ? "" :(n = n[0], t = r[n.length], Array(+n + 1).join(t) + decode_rle(r.substr((n + t).length))); |
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
var W,H,A,K='0("1 11 10.12");2("3 11 10.12");4("5 11 10.12");6.7="8 9 11 10.12";';H=13; | |
A='alert,HERE,prompt,THERE,confirm,EVERYWHERE,test,value,HELLO,WORLD,WHAK,From,com'[W='split'](','); | |
while(H--){if(K[H]){K=K[W](H).join(A[H])}}eval(K); | |
//unpacked | |
/* | |
alert("HERE From WHAK.com"); | |
prompt("THERE From WHAK.com"); | |
confirm("EVERYWHERE From WHAK.com"); | |
test.value="HELLO WORLD From WHAK.com"; |
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
<a href="http://%77%77%77.scriptcompress.com/">ScriptCompress.com</a> | |
<a href="http://www.scriptcompress.com/">ScriptCompress.com</a> | |
<a href="http://www.scriptcompress.com/">ScriptCompress.com</a> | |
Encoder/decoder on http://www.scriptcompress.com/30-encoders-in-1.htm |
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
$='\ | |
ZnVu\ | |
Y3Rpb\ | |
24gcmF\ | |
uZG9tU2\ | |
l0ZSgpe3\ | |
ZhciBhPSJ\ | |
odHRwOi8vd\ | |
3d3LldIQUsu\ | |
Y29tIGh0dHA6\ |
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
function b2a(a) { | |
var c, d, e, f, g, h, i, j, o, b = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", k = 0, l = 0, m = "", n = []; | |
if (!a) return a; | |
do c = a.charCodeAt(k++), d = a.charCodeAt(k++), e = a.charCodeAt(k++), j = c << 16 | d << 8 | e, | |
f = 63 & j >> 18, g = 63 & j >> 12, h = 63 & j >> 6, i = 63 & j, n[l++] = b.charAt(f) + b.charAt(g) + b.charAt(h) + b.charAt(i); while (k < a.length); | |
return m = n.join(""), o = a.length % 3, (o ? m.slice(0, o - 3) :m) + "===".slice(o || 3); | |
} | |
function a2b(a) { | |
var b, c, d, e = {}, f = 0, g = 0, h = "", i = String.fromCharCode, j = a.length; |
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
function myIndexOf(a, b) { | |
var c, d, e = a.length, f = b.length; | |
for (c = 0; e > c; c++) { | |
for (d = 0; f > d && a[c + d] == b[d]; d++) ; | |
if (d == f) return c; | |
} | |
return -1; | |
} | |
//USAGE: |