pk-fr / yakpro-po

YAK Pro - Php Obfuscator
http://www.php-obfuscator.com
Other
1.27k stars 354 forks source link

problem with dynamic properties #37

Closed softwarevamp closed 5 years ago

softwarevamp commented 5 years ago

a code sample:

$data = '{"prop":"val"}';
$data = json_decode($data);

if (isset($data->prop)) {
    echo 'true';
} else {
    echo 'false';
}

returns true and will be encoded as:

goto DHKg9; yqEUg: echo "\x74\x72\x75\x65"; goto R9s06; U99Jy: $QwkQT = json_decode($QwkQT); goto J4ocS; qtu0F: echo "\146\141\154\163\145"; goto cN9Mc; DHKg9: $QwkQT = "\x7b\x22\x70\162\x6f\x70\x22\x3a\x22\166\141\x6c\42\x7d"; goto U99Jy; J4ocS: if (isset($QwkQT->i348Y)) { goto YGJH6; } goto qtu0F; CPTcV: YGJH6: goto yqEUg; cN9Mc: goto MsDzS; goto CPTcV; R9s06: MsDzS:

return false

pk-fr commented 5 years ago

See README.md:

Do not use PDO::FETCH_OBJ but use PDO::FETCH_ASSOC instead! ( same for all other dynamic property retrieval...)

or disable properties obfuscation in the config file.