arshidkv12 / phpBolt

Best php encoder - free | Encrypt php source code
https://phpbolt.com
225 stars 49 forks source link

require encrypted files that returns string/array/.. value returns 0 or 1 #22

Open Mina4lfy opened 1 year ago

Mina4lfy commented 1 year ago
$dir = '/some/path';
$filepath = "$dir/src/file.php";
$destpath = "$dir/dst/file.php";

$contents = '<?php return ["old" => "x", "new" => "y"];';
file_put_contents($filepath, $contents);

// Encrypting $filepath using phpbolt into the $destpath ..

var_dump(require $filepath);
// returns : array(2) { ["old"]=> string(1) "x" ["new"]=> string(1) "y" }

var_dump(require $destpath);
// returns int(0) or int(1)

Note that it happens whether return 0; is added to prepend string or not. In:

$preppand = '<?php bolt_decrypt( __FILE__ , PHP_BOLT_KEY); return 0;
##!!!##';
smirnov1990 commented 8 months ago

Hello Is there a solution?