Test Block Top

The Blog...
Articles, Tips & Trick and Other Interesting Information...

17 Mei 2012

Encript & Decrypt File JavaScript

Beberapa web developer sengaja compress file js (javascript), dengan alasan paling umum menghindari orang lain mencuri code yang mereka tulis. Untuk encrypt file js, online tool yang biasa digunakan web developer adalah packer buatan Dean Edwards. Tinggal paste konten file js pada text area Paste:, check checkbox Base62 encode kemudian klik tombol Pack. Hasil encrypt dapat anda lihat pada text area Copy:

Contoh hasil encrypt javascript:


eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('<1>2 3(){6.0=2(0,4){7.8(0+\' \'+4)}}5=9 3;5.0(\'a\',\'b\');</1>',12,12,'foo|script|function|HelloWorld|bar|H|this|document|write|new|Hello|World'.split('|'),0,{}))

Namun bagaimana jika anda ingin decode (decrypt) file javascript? Sayangnya packer tool Dean Edwards hanya bisa decode hasil encode text area Paste: (text area Copy: sengaja diberi batasan read-only). Sebenarnya saya maju mundur mau posting artikel ini (takut dikomplain ama Dean Edwards, ha..ha...), namun sekedar buat sharing info untuk anda yang ingin decrypt (decode) file .js hasil encript packer Dean Edwards (biasanya dimulai dengan code eval(function(p,a,c,k,e,r)..., berikut triknya.
  1. Kunjungi situs unpacker js di sini.
  2. paste code js pada text area Paste Packed Code Here
  3. Klik tombol Unpack
  4. Copy hasil encrypt (decode) file javascript pada text area Un-Packed Code
Contoh hasil decrypt code encrypt javascript di atas:



< script >
function HelloWorld() {
this.foo = function (foo, bar) {
document.write(foo + ' ' + bar)
}
}
H = new HelloWorld;
H.foo('Hello', 'World'); < /script>

Selesai

4 komentar:

Loncat ke Atas ↑