2017 © Pedro Peláez
 

library javascript-unpacker

PHP helper that makes easy to unpack JavaScript code packed by Dean Edwards packer tool

image

mervick/javascript-unpacker

PHP helper that makes easy to unpack JavaScript code packed by Dean Edwards packer tool

  • Friday, November 20, 2015
  • by mervick
  • Repository
  • 5 Watchers
  • 11 Stars
  • 79 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 0 Open issues
  • 3 Versions
  • 8 % Grown

The README.md

JavaScriptUnpacker

Makes easy to unpacking JavaScript code packed by Dean Edwards packer tool. Supports of all known encodings. The input script may contain multiple encoded code blocks, mixes with the non-encoded code, and is also supported for repeatedly encoded code., (*1)

Installation via Composer

composer require "mervick/javascript-unpacker"

Usage

echo JavaScriptUnpacker::unpack(file_get_contents('/path/to/packed.js'));

Unpack JavaScript via PHP eval(function(p,a,c,k,e,d)

$js =<<<JS
eval(function(p,a,c,k,e,r){e=String;if(!''.replace(/^/,String)){while(c--)r[c]=k[c]||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}('0.1(\'2 3!\');',4,4,'console|log|Hello|world'.split('|'),0,{}));
JS;

echo JavaScriptUnpacker::unpack($js);
// output: console.log('Hello world!');;

Requirements

PHP >= 5.4, (*2)

License

MIT, (*3)

The Versions

20/11 2015

dev-master

9999999-dev

PHP helper that makes easy to unpack JavaScript code packed by Dean Edwards packer tool

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

12/11 2015

v1.0.1

1.0.1.0

PHP helper that makes easy to unpack JavaScript code packed by Dean Edwards packer tool

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

10/11 2015

v1.0.0

1.0.0.0

PHP helper that makes easy to unpack JavaScript code packed by Dean Edwards packer tool

  Sources   Download

MIT

The Requires

  • php >=5.4.0