Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Mina4lfy opened this issue Jul 20, 2022 · 1 comment

Comments

@Mina4lfy
Copy link

$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
Copy link

Hello
Is there a solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants