ivaniv1988
ivaniv1988

Reputation: 7

Is there a way to show unknown name and value variable in php code?

I have a file1.php with a variable. The variable name is unknown. file1.php is encrypted with ZendGuard 5. So i can not view code. In file1.php is include file2.php. I dont know place where file2.php is included, because file1.php is encrypted. Is there a way to show unknown name variable in php code?

Example:

file1.php (it will be encrypted with ZendGuard 5)

$my_secret_variable='Hi stackoverflow!';
$my_other_secret_variable_SOME_RANDOM_A4Nf8d3ET='Hi stack!';
include ('file2.php');

file2.php (not encrypted) Lets try to guess name and value of secret variable.

//first attempt
echo'$my_secret';
//second attempt
echo'$my_secret_var';
//etc

Is there a way to show unknown name and value variable in php code?

Upvotes: 0

Views: 172

Answers (1)

Bjørne Malmanger
Bjørne Malmanger

Reputation: 1477

You could try using get_defined_vars:

$all = get_defined_vars();

print_r($all);

Upvotes: 0

Related Questions