PHP code example of vanry / javascript-unpacker

1. Go to this page and download the library: Download vanry/javascript-unpacker library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

vanry / javascript-unpacker example snippets



use JavascriptUnpacker\JavascriptUnpacker;

$source = "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,{}))";

$unpacker = new JavascriptUnpacker;

echo $unpacker->unpack($source);